Page 1 of 1

html in tinymce

Posted: Wed Mar 03, 2010 8:37 pm
by regus
I've developped a module which uses tinymce. In my database, I store text in html-format. For example line1line2

I want to display this html-text in a tinymce editor, but I always see the html completely, including the html-tags.

I use the function 'CreateTextArea' to display the textarea.

MyModule::CreateTextArea(true,$id,$myText,"txtMyText");
--> where $myText contains "line1line2"

I'm doing something wrong, but I don't know what...

Re: html in tinymce

Posted: Wed Mar 03, 2010 8:46 pm
by Dr.CSS
Most likely your problem is you are calling a text area not tiny so of course your only going to get raw code...

Re: html in tinymce

Posted: Wed Mar 03, 2010 9:02 pm
by regus
No, the textarea is indeed a tinymce (see screenshot)

Re: html in tinymce

Posted: Mon Mar 08, 2010 6:38 pm
by Dr.CSS
If you look at that in raw html mode does it have the in html entities?...

Re: html in tinymce

Posted: Tue Mar 09, 2010 9:18 pm
by regus
If I look at it in raw-mode it is the content of the editor is : line 1
line 2 And that is exactly what is stored in my database
If I switch to html-mode it is <p>line 1<br />line 2</p>

My settings are set to "raw encoding"

Re: html in tinymce

Posted: Thu Mar 11, 2010 8:04 pm
by Dr.CSS
The  <p>line 1<br />line 2</p>  is why when you look at it in tiny or on a page it looks like line 1
line 2  somewhere between where you put it and tiny getting it it is changed into html entities...