I want to use a javascript (codethateditor) to provide a rich text editor in an administrative area of a site.
Problem with this script. See code below:
<script language="javascript1.2">
<!--
var editorDef = {
text : '#get_text.text_content#',
style : {
width : 400,
height : 400,
defaultClass : {
backgroundcolor : "##ffffff",
bordercolor : "##efefe0",
borderstyle : "inset",
borderwidth : 2
}
}
};
var editor = new CEditor('sample', editorDef);
editor.create();
//-->
</script>
The site is written in Coldfusion. The javascript variable text is equal to the Coldfusion variable #get_text.text_content# (get_text is the name of the query and text_content is a column returned from a table).
When text_content contains html tags like
<h1>hello world</h1>
[continued] ... my javascript editor breaks. I get a javascript error at the bottom of the page. Neither the editor nor its contents are visible.
What can I do to allow the editor to start off with the value that is stored in the database?
Galaxygal