0
votes

I'm using TinyMCE 4 to edit a textarea . i'm using code sample plugin .

After the saving all textarea in database i can't see codes like <html> <body> <?php ?> .

When i load saved data in fronend of my website like a article everything is good But when i want to edit article inside textarea TinyMce clears all my codes and tags .

How i can load all contents of my article from database without losing codes and tags inside a textarea to edit and save ?

It seams TinyMce remove all tags before loading maybe for security problems !

I'm using TinyMce by Codeigniter PHP framework

Before Save in db : enter image description here

After Saving in db and reload : enter image description here

1

1 Answers

0
votes

I could solve this problem by adding :

<?php echo htmlentities($data); ?>

$data is data loaded to textarea and htmlentities() makes tags visible