TinyMCE弹出窗口调整大小

3

我正在使用带有表情插件的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

根据您是否包含tinymce.js或tinymce_src.js,从editor_plugin.js editor_plugin_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
    },

我尝试将高度从默认的160更改为400。清除了缓存,然后单击TinyMCE中的小笑脸,但窗口仍然以相同的大小弹出。我还需要做些什么吗?这是在editor_plugin.js中完成的,因为我的emotions文件夹没有editor_plugin_src.js文件。 - wiggles
我的情感文件夹中有两个文件,一个被压缩过,一个没有被压缩。 - Thariama
一个主题能让它停止工作吗?我相信我的情感插件正在“高级”主题中使用。 - wiggles
可能,但我也正在使用高级主题-所以这不是问题。 - Thariama
抱歉,我对tinyMCE不是很熟悉,因为我正在为别人解决这个问题。你是指tinyMCE.init({ ... })的内容吗? - wiggles
显示剩余2条评论

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接