problem with web based html WYSIWYG Editor

JavaScript and client side scripting.

Moderator: General Moderators

problem with web based html WYSIWYG Editor

Postby struch23 » Sat Oct 14, 2006 11:41 am

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:

Syntax: [ Download ] [ Hide ]
/*** 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/,"");


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


        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.
Forum Newbie
Posts: 4
Joined: Tue Aug 01, 2006 5:42 pm

Postby AKA Panama Jack » Sat Oct 14, 2006 10:35 pm

You might want to look into TinyMCE. It works with Safari, they haven't updated their compatability chart is many months.

It works with more browsers and will default to the standard editor if an unsupported browser is detected.
User avatar
AKA Panama Jack
Forum Regular
Posts: 878
Joined: Mon Nov 14, 2005 5:21 pm

Return to Javascript

Who is online

Users browsing this forum: No registered users and 1 guest