
neubeedoo
New User
Apr 10, 2005, 8:12 AM
Post #3 of 6
(5691 views)
Shortcut
|
|
Re: [ross] Anyone intergrated a diff wysiwyg editor w/PP?
[In reply to]
|
Can't Post
|
|
I am having no luck at replacing the editor. First let me say that I know nothing about JS by any stretch of the imagination, and that is big hurdle #1. #2 - the client uses Firefox in much greater proportion to IE, and therefore it is a MUST that I swap this out if they are to use PP. Dave (in a post on the htmlarea.com forum) indicated that I would need to edit both )interface.html and _page_menus.html. I am trying to intergrate "FCKeditor" in place of htmlarea. _interface.html <script language="Javascript1.2"><!-- // load htmlarea _editor_url = "$imageurl$htmlarea/"; // URL to htmlarea files var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } // --></script> I no longer need to screen for IE only, so for the new editor I tried: <script type="text/javascript"><!-- // load new editor _editor_url = "$imageurl$fckeditor/"; // URL to editor document.write('<scr' + 'ipt src="' +_editor_url+ 'fckeditor.js"'); document.write('</scr' + 'ipt>'); // --></script> Now FCKeditor can be called two ways: it can be called from the head (which I would assume I would need to incorporate into the _interface.html template) <head> <script type="text/javascript"> window.onload = function() { var oFCKeditor = new FCKeditor( 'MyTextarea' ) ; oFCKeditor.ReplaceTextarea() ; } </script> </head> *** where in the <body> there is a <textarea id="MyTextarea" name="MyTextarea">something</textarea> In the above case I'd make use of "field$n$" somehow???? The other was is inline (which I would assume would be what I'd need to incorporate into the _page_menus.html template: <script type="text/javascript"> var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.Create() ; </script> The _page_menus.html has two cells: <!-- templatecell : wysiwyg --> <tr> <td colspan=3><font size=1><br></font> <table border=0 cellspacing=0 cellpadding=0> <tr> <td><font size=2 face="ms sans serif,arial">$name$</font></td> <td align=right><span id="hide$n$"><font size=2 face="ms sans serif,arial"> <input type="radio" name="format$n$" value="text" $text_checked$> Text <input type="radio" name="format$n$" value="html" $html_checked$> HTML </font> </span></td> </tr> <tr><td colspan=2> <textarea name="field$n$" id="field$n$" cols="60" rows=$rows$ wrap=soft>$value$</textarea> </td></tr> </table> </td> </tr> <!-- /templatecell : wysiwyg --> (the above where I'd plave the inline call??????? and <!-- templatecell : wysiwygJS --> radioOBJArr=document.getElementsByName('format$n$'); for (var x = 0; x < radioOBJArr.length; x++) { if (radioOBJArr[x].checked) { radioOBJ = radioOBJArr[x]; break; } } if(radioOBJ.value=='text'){ textareaOBJ=document.getElementById('field$n$'); textareaOBJ.value=textareaOBJ.value.replace(/(\r\n|\r|\n)/g,"<br>"); // update radio array for (var x = 0; x < radioOBJArr.length; x++) { if (radioOBJArr[x].value=='html') { radioOBJArr[x].checked = true; } else { radioOBJArr[x].checked = false; } } } spanOBJ=document.getElementById('hide$n$'); spanOBJ.style.display="none"; editor_generate('field$n$'); <!-- /templatecell : wysiwygJS --> Which looks to make the decision as to whether an editor is shown or not - I'm not sure I would need to edit this !?!? - PLEASE PLEASE PLEASE any help appreciated! I absolutely LOVE the interface and abilities of Page Publisher, but if I cannot swap out htmlarea for an editor that is not IE only, I may have to excercise the 90day MBG, as it will not be useful for this client THANK YOU
(This post was edited by neubeedoo on Apr 10, 2005, 8:16 AM)
|