<input type="button" name="return_code" id="return_code" onClick='window.opener.document.getElementById("my_input_text_result").value = document.getElementById("FCKeditor1").value' value="Return HTMLCode"><input type="text" name="my_input_text_result" id="my_input_text_result" value="" />
http://www.fckeditor.net/forums/viewtopic.php?f=6&t=8368&p=22924
var editor = new FCKeditor("test123");
// ... Then later, to get the value
var inst = FCKeditorAPI.GetInstance("test123");
var sValue = inst.GetHTML();
Re: Obtain the html value in FKCEditor?
This worked for me.
yourinstancename should be the same name like the id of the textarea you are using to create the editor.
Try to declare the variable for your editor outside of th createEditor function.
Something like:
var oFCKeditor = undefined;
createEditor () {
var sBasePath = 'fckeditor/' ;
oFCKeditor = new FCKeditor( 'yourinstanncename' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.ReplaceTextarea() ;
}
function alertValue() {
if (ofCKeditor != undefined) {
alert(FCKeditorAPI.GetInstance('yourinstanncename').GetData(););
}
}
is supposed to work. Only if the Editor is created an you call alertValue() of course...
Hope I could help.
Re: Obtain the html value in FKCEditor?