tinyMCE JQuery plugin - How do you set global config options?
I'm new to tinyMCE and I like the jQuery plugin that comes in the latest version. However I'd like to set global options that would be used in every 开发者_Python百科subsequent instance; for example themes and skins. Is this possible?
Edit.
Here is an example of the method I have used.
$(document).ready(function(){
var config = {
directionality : 'rtl'
}
$('#message').tinymce(
$.extend({}, config, {
directionality : "ltr"
}
);
});
why not just create a defaults object containing the common options
and then use $.extend(defaults, overrideOptions);
to put your overrides for each instance:
You can also use tinymce.overrideDefaults()
:
tinymce.overrideDefaults({
directionality: 'rtl'
});
精彩评论