Welcome Guest, Not a member yet? Register   Sign In
HTML Code displayed in text editor


I am using TinyMCE as text editor for admin panel in my codeigniter website.
But, it is show the html code in edit mode like this :

<p>Suspendisse ac enim nisl. Suspendisse varius lorem sit amet neque aliquam, ut blandit justo finibus. Nam tempor sagittis dolor, non condimentum elit euismod sed. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer mollis varius volutpat.</p>

It should be not displaying the html code.

What I have to do to fix this problem ?

Thank you.

(This post was last modified: 11-11-2015, 06:57 PM by PaulD.)

I think, and I personally have not used tinyMCE for some time, that the HTML has been converted to html entities on input, so that the output is no longer seen as html code, but text.

You will see if that is the case by using their 'View code' button and you will see the <p> tag for example encoded as &lt;p&gt;

So somewhere in your code the input has been converted, then outputed without deconverion back to the editor, and the editor is behaving in exactly the right way.

The answer is to decode the entities with html-entity-decode before output.


Hope that helps,


(This post was last modified: 11-11-2015, 09:43 PM by cakka.)


I have to use : html_entity_decode(set_value(.....))

Thank you

Theme © iAndrew 2016 - Forum software by © MyBB