1

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? Or another solution to this issue?

1 Answer 1

0

Your html is not valid. try use it as

<div data-img='{{view url="images/media/home/image1.jpg"}}'></div>
1
  • Hi. Thanks for your reply. I hear what you're saying, however: 1. When Magento replaces the directive with its proper content, the html WILL be valid 2. That's the way the insert widget/image button is inserting it. Your suggestion does work, however it won't be me entering the content, it will be people who won't be savvy about updating that after adding these directives Commented Jul 25, 2016 at 16:45

Your Answer

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

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