TinyMCE弹出窗口调整大小

时间:2010-09-29 14:14:55

标签: javascript plugins tinymce

我正在使用TinyMCE编辑器,带有情感插件。有没有人知道如何调整情绪插件的弹出窗口的大小,因为我有更多可以放在窗口中的表情符号,窗口没有滚动条。

我已经尝试过编辑editor_plugin.js文件,但这并没有改变任何内容。

任何帮助表示感谢。

编辑: 我的tinyMCE配置

tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        editor_selector : "mceEditor",
        editor_deselector : "mceNoEditor",
        plugins : "emotions",
        theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink,|,emotions,|,code",
        theme_advanced_buttons2 : "fontselect,fontsizeselect",
        theme_advanced_buttons3 : "",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resize_horizontal : true,
    theme_advanced_resizing : false,
    nonbreaking_force_tab : true,
    apply_source_formatting : true,
    editor_deselector : "mceNoEditor"
});

我的editor_plugin.js文件位于/ plugins / emotions /

(function() {
    tinymce.create('tinymce.plugins.EmotionsPlugin', {
        init : function(ed, url) {
            // Register commands
            ed.addCommand('mceEmotion', function() {
                ed.windowManager.open({
                    file : url + '/emotions.php',
                    width : 120 + parseInt(ed.getLang('emotions.delta_width', 0)),
                    height : 400 + parseInt(ed.getLang('emotions.delta_height', 0)),
                    inline : 1
                }, {
                    plugin_url : url
                });
            });

            // Register buttons
            ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
        },

        getInfo : function() {
            return {
                longname : 'Emotions',
                author : 'Moxiecode Systems AB',
                authorurl : 'http://tinymce.moxiecode.com',
                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
                version : tinymce.majorVersion + "." + tinymce.minorVersion
            };
        }
    });

    // Register plugin
    tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
})();

1 个答案:

答案 0 :(得分:0)

从editor_plugin.js OR editor_plugin_src.js更改此部分,具体取决于您是否包含tinymce.js或tinymce_src.js

   ed.addCommand('mceEmotion', function() {
      ed.windowManager.open({
      file : url + '/emotions.htm',
      width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
      height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
      inline : 1
    },
相关问题