开发者

tinyMCE JQuery plugin - How do you set global config options?

开发者 https://www.devze.com 2023-01-14 22:03 出处:网络
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

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'
});
0

精彩评论

暂无评论...
验证码 换一张
取 消