Getting iframe tag to work in TinyMCE
If
This will make the
To check if the new settings have been added,
iframe
tag does not work in TinyMCE (ie when iframe tag is inserted into the HTML editor, the code is simply removed), it must be enabled by modifying the tinyMCE.init
function in the application and adding the extended_valid_elements
option:tinyMCE.init({
...
extended_valid_elements : "iframe[src|
allowfullscreen|frameborder|style|scrolling|class|width|height|name|align]"
});
This will make the
iframe
tag immediately available in the editor.To check if the new settings have been added,
tinyMCE.settings.extended_valid_elements
can be typed into the Firefox or Chrome console.
Comments
Post a Comment