3

I have a matrix with a text field and a NSM TinyMCE field. For some reason the NSM TinyMCE field keeps converting HTML tags to entities. So I get things like:

<p>&lt;p&gt;&amp;lt;p&amp;gt;&amp;amp;lt;p&amp;amp;gt;&

Everytime I save the entry I get a new set of <p>&

I checked NSM TinyMCE field on its own and that works fine. No entities conversion.

I checked the channel for "Default HTML formatting in channel entries" and it's set to "Allow all HTML".

I also tried adding entity_encoding : "raw" in my TinyMCE config file.

My EE2 is v2.5.3 Matrix 2.5.2

What am I doing wrong?

1
  • Same problem please provide any guide...
    – user1830
    Jul 29, 2013 at 7:57

2 Answers 2

1

I saw this on another site that used a different CMS, it turned out to be an issue with magic_quotes on the server - we disabled magic-quotes and TinyMCE worked fine after that.

2
  • The magic quotes are already disabled on the server. Anything else I could try?
    – user1153
    Mar 11, 2013 at 23:39
  • Turned off magic quotes and still have this problem
    – Colin
    Dec 23, 2013 at 15:34
0

you can fix this by going to

\system\expressionengine\third_party\nsm_tiny_mce\ft.nsm_tiny_mce.php

return form_textarea(array(
   'name' => $this->cell_name,
   'id' => $this->col_id,
   'value' => $data,
   'rows' => ' ',
   'style' => "height: {$this->settings['height']}px"
  ));

Replace this with

return ' <textarea name="'.$this->cell_name.'" id="'.$this->col_id.'" style="height:'.$this->settings['height'].'px">'.$data.'< /textarea>';
1
  • Tried this - though needed to remove the space between the '<' and '/textarea>". Did not resolve the problem within the Matrix field, and made non-matrix fields have the HTML formatting.
    – Colin
    Dec 23, 2013 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.