1

Topic: How can I get TinyMCE to ignore (not validate) everything inside {{}}?

Hello,
Using TinyMCE 3.4.7 (Magento 2) and I'm having an issue where when I insert Magento CMS directives into an html attribute, the resulting html ends up completely broken. For example:

<div data-img="{{view url="images/media/home/image1.jpg"}}"></div>

will be converted into:

<div data-img="{{view url="></div>

by the editor. Is there a way to get the TinyMCE editor to ignore everything inside the Magento curly brace {{  }} cms directives?
Thanks

2

Re: How can I get TinyMCE to ignore (not validate) everything inside {{}}?

iturner5150 wrote:
<div data-img="{{view url="images/media/home/image1.jpg"}}"></div>

[...] Is there a way to get the TinyMCE editor to ignore everything inside the Magento curly brace {{  }} cms directives?

No, not unless you encode the quotes properly:

<div data-img="{{view url=&quot;images/media/home/image1.jpg&quot;}}"></div>

If your code inside the editor gets encoded this way, TinyMCE should leave the curly braces alone.

Greetings from Germany,

Felix Riesterer.
-- I am neither Moxiecode nor Ephox! --