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?

  • Same problem please provide any guide... – user1830 Jul 29 '13 at 7:57
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.

| improve this answer | |
  • The magic quotes are already disabled on the server. Anything else I could try? – user1153 Mar 11 '13 at 23:39
  • Turned off magic quotes and still have this problem – Colin Dec 23 '13 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>';
| improve this answer | |
  • 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 '13 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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