开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜