Magento News
Tiny MCE: use seperate config file (for youtube)
In Magento, there is this setup.js file (located in jsmageadminhtmlwysiwygtiny_mce) for tiny mce. This is a file which I don’t wanna edit, therefore I’m making a seperate js file for the tiny mce configuration.
This is what I got in my ‘tiny_mce_youtube.js’ file.
tinyMCE.init({
plugins : 'safari,pagebreak,style,layer,table,advhr,advimage,emotions,iespell,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,youtubeIframe',
extended_valid_elements : 'iframe[src|title|width|height|allowfullscreen|frameborder|class|id],object[classid|width|height|codebase|*],param[name|value|_value|*],embed[type|width|height|src|*]',
theme_advanced_buttons3_add : 'youtubeIframe'
});
The tiny_mce_youtube.js is loaded after setup.js. But it isn’t overriding the setup.js configurations.
Is there something I have overlooked?
Thanks!
First try. I have done this after Jevgeni’s comment.
tinyMceWysiwygSetup.prototype = new tinyMceWysiwygSetup();
tinyMceWysiwygSetup.prototype.getSettings = function(mode) {
this.plugins = 'safari,pagebreak,style,layer,table,advhr,advimage,emotions,iespell,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,youtubeIframe'
this.settings = {
extended_valid_elements : 'iframe[src|title|width|height|allowfullscreen|frameborder|class|id],object[classid|width|height|codebase|*],param[name|value|_value|*],embed[type|width|height|src|*]',
theme_advanced_buttons3_add : 'youtubeIframe'
}
}
Tiny MCE: use seperate config file (for youtube)
Possibly Related Posts:
- Database query different results
- Menu highlight in magento under admin
- magento disable a banner on certain category pages or have a banner with multiple links
- Magento, using ACL for frontend. Possible?
- Magento IE-7 Fix In Windows XP
RSS Feed