mel03
12-08-2006, 05:33 PM
Hi,
I am trying to install Kevin Roth's Cross-Browser Rich Text Editor on my website.
I would like to show preview of the content when the submit button is clicked using the javascript innerHTML function.
Kevin has a usage example here (http://www.kevinroth.com/rte/usage.htm)but I still can't fiigure out it works.
Can anyone help?
The form code is below:
<form name="RTEDemo" action="demo.htm" method="post" onsubmit="return submitForm();">
<!--
function submitForm() {
//make sure hidden and iframe values are in sync for all rtes before submitting form --- this is the part that I don't understand
updateRTEs(); //how should I write the funtion here for preview using innerHTML
}
//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML)
initRTE("./images/", "./", "", false);
//build new richTextEditor
var rte1 = new richTextEditor('rte1');
rte1.html = 'here's the "\<em\>preloaded\<\/em\> \<b\>content\<\/b\>"';
//below would be the script to build the rte
//
rte1.build();
//-->
</script>
<p><input type="submit" name="submit" value="Preview" /></p>
</form>
where should I add the iframe and hidden values for the form?
Thanks.
Melissa
I am trying to install Kevin Roth's Cross-Browser Rich Text Editor on my website.
I would like to show preview of the content when the submit button is clicked using the javascript innerHTML function.
Kevin has a usage example here (http://www.kevinroth.com/rte/usage.htm)but I still can't fiigure out it works.
Can anyone help?
The form code is below:
<form name="RTEDemo" action="demo.htm" method="post" onsubmit="return submitForm();">
<!--
function submitForm() {
//make sure hidden and iframe values are in sync for all rtes before submitting form --- this is the part that I don't understand
updateRTEs(); //how should I write the funtion here for preview using innerHTML
}
//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML)
initRTE("./images/", "./", "", false);
//build new richTextEditor
var rte1 = new richTextEditor('rte1');
rte1.html = 'here's the "\<em\>preloaded\<\/em\> \<b\>content\<\/b\>"';
//below would be the script to build the rte
//
rte1.build();
//-->
</script>
<p><input type="submit" name="submit" value="Preview" /></p>
</form>
where should I add the iframe and hidden values for the form?
Thanks.
Melissa