我想允许输入某些html标记,例如iframe并嵌入Magento的CMS编辑器中。 Magento不允许这些标签。Magento - 如何允许Magento的CMS编辑器中的某些标签(iframe,嵌入)?
是否有我可以编辑的模型或控制器,以允许iframe和嵌入标签?
我想允许输入某些html标记,例如iframe并嵌入Magento的CMS编辑器中。 Magento不允许这些标签。Magento - 如何允许Magento的CMS编辑器中的某些标签(iframe,嵌入)?
是否有我可以编辑的模型或控制器,以允许iframe和嵌入标签?
查找该文件中:JS /法师/ adminhtml /所见即所得/ tiny_mce/setup.js
找到这段代码:
var settings = {
mode : (mode != undefined ? mode : 'none'),
elements : this.id,
theme : 'advanced',
plugins : plugins,
theme_advanced_buttons1 : magentoPlugins + 'magentowidget,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect',
theme_advanced_buttons2 : 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,forecolor,backcolor',
theme_advanced_buttons3 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,ltr,rtl,|,fullscreen',
theme_advanced_buttons4 : 'insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,pagebreak',
theme_advanced_toolbar_location : 'top',
theme_advanced_toolbar_align : 'left',
theme_advanced_statusbar_location : 'bottom',
theme_advanced_resizing : true,
,并在其后补充一点:
extended_valid_elements : 'iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder],style,script',
这是一个简单的以逗号分隔的想要允许的标签列表。
这对Magento EE 1.13不起作用;还有什么要考虑的吗? – feeela 2014-06-26 13:45:39
乔希是正确的目标,我添加了该行接受了“关于Faceb找到我们......” - IFRAME:
extended_valid_elements : 'iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder|allowTransparency],style,script',
它有一个额外的属性自动生成的FB-iframe中那。
编辑CMS页面时,可以切换到HTML视图。
通过按HTML按钮
在那里,您能在iframe添加到页面上,就在HTML
只是想指出,该编辑器是TinyMCE的,可能已经有用于控制允许的元素的选项。我已经标记了这个问题,以便其他人可以帮助更好。 – clockworkgeek 2011-03-02 12:17:08