1

Topic: how to parse <br><p> and n r correct?

Hi All.

I use the tinyMCE, in a webbased messangersystem on my commynity www.poeter.se (swe) it works fantastic but, I have a parsing problem?

If a member that use the editor send a messege to a member that do not use the editor I have som problem parsing the conent in a correct whay and display it in a regular textarea.

The problem: How do I change the <p>,<p align="left"><br /> and so an to correct linebreaks like r n that I can use in an "non-editor-textarea"?

thanks alot / Johannes

2

Re: how to parse <br><p> and n r correct?

Well, im not sure I understand exactly, but if you just want to replace a few single items I would suggest looking into Regex in your language of choice. Otherwise I would suggest you replace <br /> with n and just strip the rest of the tags (with Regex or php has a nifty function called strip_tags).

Afraithe
TinyMCE Developer
Moxiecode Systems

3

Re: how to parse <br><p> and n r correct?

sorry Im not so clear!

If I type linebreak in the editor, and save the output in my sql, and then I display the text "<p>text text</p> <p>more text text</p>" i a regular textarea, not using an htmleditor i do not get any linebreakes?

I guess need to convert the html to n and r to display it correct?

regards / johannes