Hi there,
I was just wondering wether it is possible to pre-load html into the editor from MySQL.
I ask this because:
Say if someone clicks a edit button on my site to edit some text that is already there, how could i pull that text and get it to load in the editor as the defualt text.
Theres one more complication the text i wish to pull from the database is already HTML!
Many thanks,
James Barlow
I was just wondering wether it is possible to pre-load html into the editor from MySQL.
I ask this because:
Say if someone clicks a edit button on my site to edit some text that is already there, how could i pull that text and get it to load in the editor as the defualt text.
Theres one more complication the text i wish to pull from the database is already HTML!
Many thanks,
James Barlow
RE: Pre-Load HTML into the editor
if it's html, then make sure to "escape" any < or > characters (etc).
RE: Pre-Load HTML into the editor
<form action="foo.php" method="post">
<script type="text/javascript">
<!--
var oFCKeditor = new FCKeditor("someTextField");
oFCKeditor.BasePath = "/the/path/to/FCKeditor/";
oFCKeditor.Value = "Hello, <b>world</b>.\n";
oFCKeditor.Create();
//-->
</script>
<input type="submit" value="Save" />
</form>
The word "world" will be rendered in bold in the FCKeditor's buffer. If you want the <b> to appear as is, then your code must escape all HTML special characters ('<' becomes <, etc).
Re: Pre-Load HTML into the editor
you have specified that you can put the code in the <textarea></textarea>
but where do you find the code.
i am also developing an application where i have to retrieve HTML from the database to the FCKEditor
please help i have very less time to finish this functionality