views:

24

answers:

1

I am using the TinyMCE editor, with the emotions plugin. Does anyone know how to resize the pop up window for the emotions plugin, as I have more emoticons that can fit in the window and the window has no scroll bar.

I have tried editing the editor_plugin.js file but this didn't change anything.

Any help appreciated.

EDIT: My tinyMCE config

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"
});

My editor_plugin.js file in /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);
})();
A: 

Change this part from editor_plugin.js OR editor_plugin_src.js depending on if you have tinymce.js or tinymce_src.js included

   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
    },
Thariama
I tried changing the height from the default 160 to 400. Cleared my cache then clicked on the little smiley face in TinyMCE and the window still popped up the same size. Is there anything else I need to do?This was done in editor_plugin.js as my emotions folder doesn't have a editor_plugin_src.js file.
wiggles
works perfectly for me and the popup window is resized
Thariama
my emotions folder has both files, one minified and one not-minified
Thariama
Could a theme stop it from working? I believe my emotions plugin is being used in the 'Advanced' theme
wiggles
possibly, but i am using the advanced theme too - so this is not the problem
Thariama
does this problem apply to other popup windows in tinymce? can you please post your complete tinymce configuration?
Thariama
Sorry I am not that familiar with tinyMCE, as I am fixing this problem for someone else. Do you mean the tinyMCE.init({ ... }) stuff?
wiggles
yes, exactly that init
Thariama
I've added some extra bits above, as you can see I've changed the height to 400, but this still gives me the default size.
wiggles
hmm, sry i got no idea
Thariama