tags:

views:

30

answers:

2

While iam editing my page How i can retain the html tag as it is in tinymce editor( iam using textarea).

A: 

tinymce usually add slashes to special characters like quotes. so you can use stripslashes function in php to remove slashes.

rahim asgari
When i taking from the db all the html tags are their.But when i placing inside textarea it is not showing
THOmas
could u show your html codes?
rahim asgari
<textarea id="page_content_id" name="page_content"><?php echo $page_content;?></textarea>
THOmas
and what is inside $page_content?
rahim asgari
A: 

I am not sure what you mean exatly but if it is a problem with your HTML changing when placed in TinyMCE then this will help.

You will need to edit your valid_elements. See link for instructions

http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements

If it is a problem with not getting the HTML from TinyMCE when saving it then use this:

var content = tinyMCE.getInstanceById(element_id).getBody().innerHTML;
Todd Moses