Search code examples
javascripttinymcefont-sizetextcolor

TinyMCE does not apply font-size and text-color while project is on the web


I've used TinyMCE in my projects. It works well when I run the web application locally. But when I put the files on the internet, text-color and font-size don't apply in the formatting.
What's the problem ?


Solution

  • Finally I've found the problem when I saw the source of page.
    This is what is stored in databae for one of that items:

    <span style=\"font-size: 24pt; color: #ff0000;\">
    

    When I removed \ from stored data, problem got solved. I'm using PDO to connect PHP with MySQL. So I think it is escaping double quotes.
    So the solution is about preventing PDO to escape double quotes.

    Thank you all to getting participate in this question.