How do I make a text editor like TinyMCE Work with a Database? |
[eluser]Alfredor[/eluser]
How Am I Supposed to edit text that is located in a database from a text editor like TinyMCE Just asking? :]
[eluser]BrianDHall[/eluser]
Step 1- get text from database. Step 2- echo it out as content in the TinyMCE textarea of your form. Step 3- receive submitted content, clean it, and store it back in database.
[eluser]Alfredor[/eluser]
Okay lets see if I can do it :] Code: $this->db->get('content');//for the sake of simpleness
[eluser]Alfredor[/eluser]
How I'm I supposed to enter the modified text into the database? ![]()
[eluser]dchuk[/eluser]
I don't have any experience with TinyMCE but doesn't it just extend a standard Form textarea? If it does, then just process the form like you would any other standard form on your site.
[eluser]Alfredor[/eluser]
You mean changing the action to a mysql insert function? (Update in this case)
[eluser]dchuk[/eluser]
[quote author="Alfredor" date="1261459453"]You mean changing the action to a mysql insert function? (Update in this case)[/quote] The action should be a controller action that will call an "update" function in a model to process all the posted data and update your database. Try watching this and applying the concepts in it to what you are doing: CRUD Screencast
[eluser]Alfredor[/eluser]
Interesting SC, I'm watching anyways, does anyone wonders why is the PECL website not working? ._. Its weird.
[eluser]Alfredor[/eluser]
Hey everyone!, I got it working wonderfully here is an screenshot. ScreenShot |
Welcome Guest, Not a member yet? Register Sign In |