Hi Everyone,
First, I would love to say, this thing is sweet and so easy to integrate, one afternoon and its into my application and framework .. so .. here's my pain:
I found the code example for FCKeditor_OnComplete and got that working .. But like one of the responders said, one needs to overload the AttachToOnSelectionChange .. How do I do that?
Secondly, I need to have a Form.Reset feature. Basically reverts the FCKeditor to the pre-edited state .. Any idea how to do this?
Thanks,
M
First, I would love to say, this thing is sweet and so easy to integrate, one afternoon and its into my application and framework .. so .. here's my pain:
I found the code example for FCKeditor_OnComplete and got that working .. But like one of the responders said, one needs to overload the AttachToOnSelectionChange .. How do I do that?
Secondly, I need to have a Form.Reset feature. Basically reverts the FCKeditor to the pre-edited state .. Any idea how to do this?
Thanks,
M
RE: Overloading the AttachToOnSelectionChange
RE: Overloading the AttachToOnSelectionChange
RE: Overloading the AttachToOnSelectionChange
You just have to make a "copy" of the content via JavaScript.
RE: Overloading the AttachToOnSelectionChange
I call this javascript:
document.myadmin.ArtBody.ReplaceTextarea();
and I get an error that ReplaceTextarea is not a function.
I am stuck .. How do I undo / cancel / reset changes made in the FCKeditor from say an UNDO button. Calling the Form.Reset command does not work.
RE: Solved
//For storing the default value.
var osfckEditorOrigValue = document.myform.osfckEditor.value;
//For Reverting back ..
FCKeditorAPI.GetInstance("osfckEditor").SetHTML(osfckEditorOrigValue);
I'm really enjoying FCKEditor .. Just got to figure out how to get all the different functions / settings.
RE: Overloading the AttachToOnSelectionChange
var counter = 0 ;
function DoSomething( editorInstance )
{
window.document.title = editorInstance.Name + ' : ' + ( ++counter ) ;
}
function FCKeditor_OnComplete( editorInstance )
{
editorInstance.Events.AttachEvent( 'OnSelectionChange', DoSomething ) ;
}
Can you not add whatever you need to the "DoSomething" function?
I havent messed with this stuff so forgive me if I'm not on point! =-]