HI,
I want to know which is the value of the html, so I can use it like this:
• In my popup editor:
<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">
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?
I can`t make it works
throw me this error:
Fatal error: Call to a member function GetInstance() on a non-object in C:\wamp\www\myproject\fckeditor\_samples\php\sample03.php on line 78