Reputation: 27185
I have added tinyMCE editor in my app which is developed in CodeIgniter 3. But I am having issue in handling it's content on POST.
When content is submitted, and if any other field has error, so it needs to show the content which user submitted, but that it is showing tags.
Initially it looks like this:
And afr submit it looks like this:
How to fix this so that even multiple POST submits it looks properly, nit with tags?
Upvotes: 2
Views: 949
Reputation: 7111
Make your own extension of form helper with next function within:
function set_ta_value($field, $tv = NULL)
{
$CI =& get_instance();
if ($CI->input->post($field)) return $CI->input->post($field);
return $tv;
}
set_ta_value()
should be used instead set_value()
for text area field.
Docs.
All credits go to @Wouter60.
Upvotes: 1