Jump to content

tinymce span style color not working


vinpkl

Recommended Posts

hi all

 

I m using tinymce for adding content to my website.

 

also i m using

$detail = mysql_real_escape_string('$detail');

 

When ever i select text and change its colour, tinymce add <span> tag to it with a slash in style attribute.

 

This is what is getting added to my database

 

 

<p><span style=\"color: #3366ff;\">Feel free to try</span> out the different features that are provided,</p>

 

When i echo it on my detail page

echo $detail;

 

then the style color doesnt get applied on the text.

 

what should i do to echo the text in colored format.

 

vineet

 

Link to comment
https://forums.phpfreaks.com/topic/280857-tinymce-span-style-color-not-working/
Share on other sites

First off, this won't work.  Why single quotes around the var?

$detail = mysql_real_escape_string('$detail');

Second, assuming that's not really your code, you should check get_magic_quotes_gpc() and if true run stripslashes() on the data or else you'll end up with slashes in your db data once you use mysql_real_escape_string().

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.