Hi Guys,
I've encountered a situation where googling and the forum hasn't do much help for me so I've decided to create a new topic on it. Hopefully someone can point me to the right direction.
we are developing a site that uses fckeditor for paragraph input. However, we are not submitting the form, instead we are using Prototype to extract the form data. But this only gets the original textarea value, not the HTML content.
any help is appreciated.
Cheers
I've encountered a situation where googling and the forum hasn't do much help for me so I've decided to create a new topic on it. Hopefully someone can point me to the right direction.
we are developing a site that uses fckeditor for paragraph input. However, we are not submitting the form, instead we are using Prototype to extract the form data. But this only gets the original textarea value, not the HTML content.
any help is appreciated.
Cheers
Re: retrieve FCKeditor value without submitting the form.
Re: retrieve FCKeditor value without submitting the form.
Re: retrieve FCKeditor value without submitting the form.
Glad to see you got your stuff working. Can you help me now? I have 3 tabs. Tab 1 is fckeditor, tab 2 is called View HTML, and tab 3 is called Preview. After I edit something in Tab1, I want to click on tab 2 and have it display the source, much like when you press the "Source" button in the editor. Here is my code, can you tell me what I'm doing wrong or give me some ideas?
this is in <head> </head>:
<script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;
oFCKeditor.BasePath = "/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
This is in <body><div> of Tab1 (the editor):
<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>
This is in div (Tab 2):
<div id="viewHTML" dojoType="dijit.layout.ContentPane" title="View HTML">
<script type="text/javascript">
var oFCKeditor = FCKEditorAPI.GetInstance('MyTextarea');
var value = oFCKeditor.GetHTML();
document.write(value)
</script>
</div>
This doesn't work. I get a FCKEditorAPI not defined error when using firebug. I've no problem sharing the code of the whole page if you want to see it........please help