I think:
var fckEditor = FCKeditorAPI.GetInstance('your-fckeditor-textbox-id');
fckEditor.EditorDocument.body.innerHTML = '';
will do what you want
Mark B
2009-10-09 16:51:07
I think:
var fckEditor = FCKeditorAPI.GetInstance('your-fckeditor-textbox-id');
fckEditor.EditorDocument.body.innerHTML = '';
will do what you want
Old question, but I ran into the same issue recently and the idea of modifying the iframe contents directly bothers me. Thankfully, the api provides us with a method for setting the value without resorting to hacking:
var editor = FCKeditorAPI.GetInstance('your-textbox');
editor.SetHTML('');
As Mark B suggests in his comment on his own post, you can put this in a function and call it in the reset handler for your form:
<script>
function resetEditor() {
var editor = FCKeditorAPI.GetInstance('your-textbox');
editor.SetHTML('');
}
</script>
<form onreset="resetEditor();">