Save content with CI and TinyMCE |
[eluser]Alex91[/eluser]
How can I save the data with CI and TinyMCE? Without ruining the make-up of the text? This is how the data get's stored and showed: Code: <p> Here the text. </p> This is how I use it atm. Model: Code: function edit($id, $data) Controller: Code: function edit($id) View: Code: <?php echo set_value('content', $content); ?>
[eluser]umefarooq[/eluser]
hi you to do some settings in tinymce init Code: force_p_newlines : false,
[eluser]Alex91[/eluser]
That doesn't work. I gues that the problem is @ the model. Where all data get's escaped. But how to not escape that?
[eluser]thinkbliss[/eluser]
I'm responding because I'm having a very similar problem and I'd like to see if someone can solve it.. Before I thought I needed to encode the HTML in the view but that didn't work either. Depending on which method I use, I either end up with the tags outputting at text as in <p>Word</p> or as the non entity &lgt;Word&rgt;. I'm using the form_validation library as well which I thought might be the issue but upon further testing, removing didn't work either. Not sure what the problem is but I thought integrating tinymce with CI was supposedly easy and I'm sure it is. Hope someone has idea for a solution.
[eluser]jjmax[/eluser]
Hi, I had a problem similar to this yesterday. I think I found a solution - Have a look at this thread - http://ellislab.com/forums/viewthread/141495/
[eluser]thinkbliss[/eluser]
Wow jjmax. I had a clue that the form helper may be the cause of the issue. Setting up my forms without it was on my list of troubleshooting tasks. Thank you. I'll give it a try. |
Welcome Guest, Not a member yet? Register Sign In |