Hi, i have seen previous posts, but they could not solve my problem.
I am trying to append the text in the editor through javascript, the InsertHTML function does this thing but
it inserts the given html at the point where the cursor is present, i need to append the html at the end of
the current html. secondly i dont want the cursor to be relocated to the end of the html.. the cursor should
retain its position after the append.
i am using FCKeditor 2.0 RC2
I have seen some solution likes
document.frames("iframe_#instanceName#").document.all.objContent.DOM.body.innerHTML = content"
but in my fckeditor script there are no such elements with id's like "iframe_"+instancename and "objContent"
but then i do have iframe with id= instancename+"___Frame"
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.Create();
My instance name is FCKeditor1
Also there is one function of SetHtml() of FCKEditorApi
but this function changes the text but make it noneditable afterwords.
kindly help me in this context..
I am trying to append the text in the editor through javascript, the InsertHTML function does this thing but
it inserts the given html at the point where the cursor is present, i need to append the html at the end of
the current html. secondly i dont want the cursor to be relocated to the end of the html.. the cursor should
retain its position after the append.
i am using FCKeditor 2.0 RC2
I have seen some solution likes
document.frames("iframe_#instanceName#").document.all.objContent.DOM.body.innerHTML = content"
but in my fckeditor script there are no such elements with id's like "iframe_"+instancename and "objContent"
but then i do have iframe with id= instancename+"___Frame"
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.Create();
My instance name is FCKeditor1
Also there is one function of SetHtml() of FCKEditorApi
but this function changes the text but make it noneditable afterwords.
kindly help me in this context..
RE: appending the editor content
Thanks Wayne
RE: appending the editor content
try this
var oEditor = FCKeditorAPI.GetInstance( instancename ) ;
var currContent = oEditor.GetXHTML( true ) ;
oEditor.setHTML( currContent + '<ourHTMLCode ) ;
Hurga