问题
Consider the initialization:
function initMyTinymce() {
tinymce.init({
selector: $(this).attr("id"),
directionality: "ltr",
});
}
Is it possible to add properties to tinyMCE after init()
?
For example:
plugins: "link,code,textcolor",
relative_urls: false,
convert_urls: false,
remove_script_host: false
I'm using TinyMce 4.1.6 (2014-10-08).
回答1:
Yes, this is possible, but parameters that get red on initialisation only won't have an impact if they get set later on. Example: To change the parameter plugins changes nothing because the tinymce UI has been rendered already.
To set a paramter after initialization use:
editor.settings.my_setting = 'abcd',
来源:https://stackoverflow.com/questions/34437755/add-properties-to-tinymce-after-init