hi guys!
I have a page where I create an instance of FckEditor.
Then I have a button (button1), when a click the button the div that includes the editor is hidden.
now, I have another button button2, and if I click on it I want to see again the fck editor.
the problem is that the first time my editor is correctly initialized, but the second time, the function getInstance return me the editor instance but I can't see anything.
This is my code:
HTML
js to initialize the editor and on button2 click
js button1
thanks!
I have a page where I create an instance of FckEditor.
Then I have a button (button1), when a click the button the div that includes the editor is hidden.
now, I have another button button2, and if I click on it I want to see again the fck editor.
the problem is that the first time my editor is correctly initialized, but the second time, the function getInstance return me the editor instance but I can't see anything.
This is my code:
HTML
<div id="updF_noteOggettoDWH" name="updFieldOggettiDetail" style="display:block;"> <textarea id="fckNoteOggettoDWH" name="fckNoteOggettoDWH"><%=formatField(object.getNoteOggettoDWH(),"")%></textarea> <input type="hidden" name="noteOggettoDWH" id="noteOggettoDWH" value="<%=formatField(object.getNoteOggettoDWH(),"")%>" /> </div>
js to initialize the editor and on button2 click
try {
noteEditor = FCKeditorAPI.GetInstance('fckNoteOggettoDWH');
} catch (e) {
}
if (noteEditor==null) {
noteEditor = new FCKeditor('fckNoteOggettoDWH') ;
noteEditor.BasePath = "../js/fckeditor/" ;
noteEditor.ToolbarSet = 'MetadatiToolbar';
noteEditor.ReplaceTextarea() ;
}
js button1
document.getElementById('noteOggettoDWH').value = FCKeditorAPI.GetInstance('fckNoteOggettoDWH').GetHTML();
thanks!
