I'm trying to display some rich text in a component with a tpl in my extjs application. I get the rich text from my database and it looks like this:
this is some example text \r\n\r\n with two line breaks
At the moment extjs just displays the text but I want it to also make the line breaks. On the server-side I use PHP and the data then gets loaded into extjs via a direct layer.
Are there any possibilities to do this? The best thing would be if you could somehow translate the rich text to HTML.
Here is an example of my tpl:
tpl:[
'<h2>Some HTML Title</h2>'
'{RICH_TEXT}'
'<p>Some more HTML Stuff</p>'
]
Thanks in advance for your help.
EDIT: I also encountered some cases where there is more than just some line breaks for example:
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\cf1\lang2055\b\f0\fs16 text text text\b0 , more text }
How can I handle this? If there is no possibility, how can I get rid of that stuff and just display the clear text, because this is visible in extjs.