tinymce get html content and place it on another page using php

swsecurity

New Member
I am using tinymce and want to show a preview of whatever user writes in the editor.Now I dont know how to get the html content of tinyMce in php.I got the content and echo them on the other page but they are not html content(with html tags) they are simple plain text.Here is what I've done so far.My Html:\[code\]<form action="../Profile/Profile_View.php" method="post" id="form"> <div id="Editor"><textarea cols="123" rows="22" id="PostEditor" name="editorValue"></textarea></div> <div id="SubmitButtons"> <a href="javascript:void(0)" onClick="SetPreview()" target="_blank" id="preview"><img src="http://stackoverflow.com/questions/Images/PreviewButton.png" width="200" height="50" /></a> <a href="http://stackoverflow.com/questions/10563612/#"><img src="http://stackoverflow.com/questions/Images/SaveButton.png" width="200" height="50"/></a> </div> </form>\[/code\]The SetPreview() function submit's the script. My PHP (in Profile_View.php):\[code\] if(isset($_POST['editorValue'])) { $previewValue=http://stackoverflow.com/questions/10563612/strip_tags(stripslashes($_POST['editorValue'])); echo $previewValue; } else { $previewValue=""; }\[/code\]When the if statment gets executed it does not output the html,only simple plain text.\[quote\]Answer:\[/quote\]Got the answer from the tinyMCE documentation. I was not using the $allowedTags variable which was causing the problem.
 
Back
Top