HighDots Forums  

A simple question about FCKEditor (free wysiwyg browser based html editor)

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss A simple question about FCKEditor (free wysiwyg browser based html editor) in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
andre a.
 
Posts: n/a

Default A simple question about FCKEditor (free wysiwyg browser based html editor) - 08-10-2004 , 04:09 PM






This post is for people who have some experience with the FCKEditor and
are aware of the quirks of the latest version. OR, for JS gurus who
would be interested in figuring it out.

There is a new version of the free FCKEditor (fckeditor.com) and the
pages I've been using broke after I upgraded.

What I am trying to do is upgrade an implementation using the older
version to the new version as it supports mozilla.

the functionality is as follows:
main editing page (p.A) contains a textarea and a link which opens a
popup (p.B) with an instance of tfckeditor. the popup takes the value
of p.A.textarea and inserts it in the fckeditor area (oFCKeditor.Value
= opener.document.form1.<%=parentField%>.value

after editing the contents of the popup window, the user clicks on
"save" button which passes the fckeditor value to the parent and closes
the popup

opener.document.form1.<%=parentField%>.value=docum ent.frames[0].objContent.DOM.body.innerHTML;
window.close();

How do I do this last part with version 2.0 of the FCKEditor?
document.frames[0].objContent.DOM.body.innerHTML does not seem to exist
in version 2.0.

Thank you in advance!
-- Andre

here's the code in more detail ---------------------------------

<form action="" method="post" name="frm_editor" id="frm_editor"
language="javascript">

<SCRIPT language="javascript">

var sBasePath = "/stage/_admin/FCKEditor/";
oFCKeditor = new FCKeditor('txtEditor') ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Width = '610' ;
oFCKeditor.Height = '550' ;
oFCKeditor.ToolbarSet = 'AccessibilityNoImages' ;
oFCKeditor.Value = opener.document.form1.<%=parentField%>.value;
oFCKeditor.CanUpload = false ;
oFCKeditor.CanBrowse = false ;
oFCKeditor.Create() ;

</SCRIPT>

<!-- THE CODE BELOW used to work for the old version and I am trying to
find an equivalent for the new version. -->

<INPUT name="Button3" type="button"
onclick="opener.document.form1.<%=parentField%>.va lue=document.frames[0].objContent.DOM.body.innerHTML;
window.close(); " value="Save Changes">

I was given the suggestion to use
document.frm_editor.txtEditor.value

but this value keeps the initial value of the editor's content area and
does not reflect any changes made to the content. I can delete
everything in the content area or add text, but this value always
returns the initial contents assigned to oFCKeditor.Value.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.