0

Problem: In cms page it's not possible to write any tag?. like


<iframe width="560" height="315" src="https://www.youtube.com/embed/_jHpnb-QmTA" frameborder="0" allowfullscreen></iframe>

If you click show/hide Editor button this content converted to


& lt;iframe width="560" height="315" src="https://www.youtube.com/embed/_jHpnb-QmTA" frameborder="0" allowfullscreen></iframe & gt;

I have tried according to their(tiny_mce) documentation. Also this solution. But no luck in Magento 1.9.3.2.

Any idea why it's not working?

1

2 Answers 2

1

Following thread can help you.

https://stackoverflow.com/questions/5163518/magento-how-to-allow-certain-tags-iframe-embed-in-magentos-cms-editor

In that, customization is mentioned to achieve this.

2
  • It's not working for me. Did you tried or working for you this solution? And I already mention in my question.
    – Sohel Rana
    May 10, 2017 at 12:28
  • Try clearing cache and hard reload in browser May 10, 2017 at 12:52
0

This solution still working fine. I tested in Magento 1.9.3.2. But here all answer are encourage modify core file. I just show here how you can do exact same thing in magento way.

So add following xml code into your handle. This is the overwrite tinyMce setup.

yourvendor/tiny-mce-setup.js

Now you need to create magentorootfolder/js/yourvendor/tiny-mce-setup.js file


if(window.tinyMceWysiwygSetup) {
    tinyMceWysiwygSetup.prototype.originalGetSettings = tinyMceWysiwygSetup.prototype.getSettings;
    tinyMceWysiwygSetup.prototype.getSettings = function(mode) {
        var settings = this.originalGetSettings(mode);
        settings.extended_valid_elements = 'iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder|allowTransparency],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]';
        return settings;
    }
}

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.