Hello all,
I am currently using tinyMCE as a WYSIWYG editor on this new site I am developing. The main problem is that the submitted code is used for layout purposes. tinyMCE uses <p> tags for new lines. I would like to replace the <p> ...</p> tags with a simple <br />. HOWEVER, If a code is submitted more than once, many <br /> tags build up.
Here is my code so far:
Elaborate, I know. How can I prevent a <br /> tag being added if there was already one inserted from a previous time. Or maybe a way to disable <p> bindings in tinyMCE?PHP Code:$update =str_replace("<p>", "", $_POST['update']);
$update =str_replace("</p>", "<br />", $update);
TinyMCE: http://tinymce.moxiecode.com/



Reply With Quote


Bookmarks