Page 1 of 1

problem with web based html WYSIWYG Editor

Posted: Sat Oct 14, 2006 11:41 am
by struch23
Hi there,

I have a problem with a web based html WYSIWYG Editor. this editor only works with new browsers and i want to disable it when old browsers use my website.

I call the editor with this code:

Code: Select all

/*** Editor Script Wrapper ***/
var oScripts=document.getElementsByTagName("script");	
var sEditorPath;
for(var i=0;i<oScripts.length;i++)
	{
	var sSrc=oScripts[i].src.toLowerCase();
	if(sSrc.indexOf("scripts/myeditor.js")!=-1) sEditorPath=oScripts[i].src.replace(/myeditor.js/,"");
	}



if(navigator.appName.indexOf('Microsoft')!=-1)

	document.write("<scr"+"ipt src='"+sEditorPath+"editor.js'></scr"+"ipt>");

else

	document.write("<scr"+"ipt src='"+sEditorPath+"moz/editor.js'></scr"+"ipt>");
My Editor woks fine with IE and Mozilla, but not with Apple Safari. How can I disable the editor to use with Apple Safari?

I want this:

When one Safari or older browser visit this page a <textarea> replace the editor. is it posible?


Can anybody help me?

Excuse my english its quite poor.

Posted: Sat Oct 14, 2006 10:35 pm
by AKA Panama Jack
You might want to look into TinyMCE. It works with Safari, they haven't updated their compatability chart is many months.

http://tinymce.moxiecode.com/index.php

It works with more browsers and will default to the standard editor if an unsupported browser is detected.