Jump to content

Modding Rich Text Editor


danposs86

Recommended Posts

I have found this rich text editor:http://www.bewebmaster.com/55.phpBasically I have copied and pasted the script from the above link and is now on my host.What I want to do is to allow the text editor to access my database, get the text stored on one of my fields and display it in the editor.Then I want to be able to edit it as I like, and press submit to update the changes I have made onto the database (same field).I have had a play but am just getting a little frustrated, making a mess and not really getting anywhere, so was hoping you guys could point me in the correct direction on how to achieve my goals.Thanks in advance.

Link to comment
Share on other sites

There's this line on the page:displayEditor('content', ' ', 600, 300);That creates the editor control from a textarea element (I don't see the textarea, does the example on that page work?) If you want to control the initial text that appears in the editor, that's the second argument to that function.displayEditor('content', 'start text', 600, 300);You can have PHP get your content from the database and insert it there. It will have to escape single quotes in the input text. To get the result to save it back in the database, once the form gets submitted you can access the hiddencontent element inside post to get the HTML that they created.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...