Last active
August 29, 2015 14:26
-
-
Save toh82/0ede5004353fb7eecbb9 to your computer and use it in GitHub Desktop.
Extend Magento RTE with HTML 5 Tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (getSettings) { | |
/** | |
* change standard behavior to not wrap code into <p>-tag | |
* and add some html5 tags | |
* | |
* @param mMode | |
* @returns {object} | |
*/ | |
tinyMceWysiwygSetup.prototype.getSettings = function (mMode) { | |
var oSettings = getSettings.call(this, mMode); | |
/* for tiny mce >= 3.5 */ | |
oSettings.forced_root_block = false; | |
/* for tiny mce < 3.5 */ | |
oSettings.force_p_newlines = false; | |
oSettings.force_br_newlines = true; | |
//------------ | |
oSettings.cleanup = false | |
var aHtml5Tags = [ | |
'+object[*]' | |
]; | |
oSettings.extended_valid_elements = aHtml5Tags.join(); | |
// both seems not to work | |
//------------ | |
oSettings.doctype = '<!DOCTYPE html>'; | |
return oSettings; | |
}; | |
}(tinyMceWysiwygSetup.prototype.getSettings)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment