I'm using the javascript FCKeditor:
This script is in a php form that puts information into a mysql database. (I found the instructions for the php FCKeditor to be ambiguous and couldn't get it to work.) Nevertheless, I managed to get "a" version working and that's all that matters.
The form works fine and the information is being placed into the database. Now, I have to make an "edit" script to edit the information. How do I get the information in the database to display in FCKeditor in a WYSIWYG format so that it can be edited?
<script type="text/javascript"> var oFCKeditor = new FCKeditor('content'); oFCKeditor.BasePath = "./../fckeditor/"; oFCKeditor.ToolbarSet = 'MyToolbar' ; oFCKeditor.Height = 400 ; oFCKeditor.Create(); </script>
This script is in a php form that puts information into a mysql database. (I found the instructions for the php FCKeditor to be ambiguous and couldn't get it to work.) Nevertheless, I managed to get "a" version working and that's all that matters.
The form works fine and the information is being placed into the database. Now, I have to make an "edit" script to edit the information. How do I get the information in the database to display in FCKeditor in a WYSIWYG format so that it can be edited?
Re: FCKeditor and an Edit script???
See my recent thread on the same thing:
viewtopic.php?f=6&t=7142
You just have to get your content into the Value variable.
Re: FCKeditor and an Edit script???
How did you assign the original content of $Value to $html?
I'm pulling information from a mysql database like so:
The information is being drawn out (seen from ViewSource) but it isn't being displayed. Now, from the View Source the information appears as it does in the database with the HTML characters. I'm hoping that I can get this displayed for editing purposes as WYSIWYG.
The javascript error message I'm getting is this:
Line: 296
Char: 107
Error: Unterminated string constant
Which is at the end of: oFCKeditor.Value = "
Like you said, it's looking for the "; at the end of that line and it isn't there because of the information drawn out of the database.
How should I fix this? And once fixed, will it appear in HTML form or WYSIWYG?