views:

21

answers:

2

Hi, I am not all that familiar with TinyMCE, but I cannot seem to configure it with a height below 100px. I've tried and it seems to always set it as 100px any time it goes below. I only need a few of the buttons and the editor window will likely never go beyond one line, so I am trying to reduce a bit of interface clutter.

A: 

Googled "TinyMCE 100px", 1st result: http://tinymce.moxiecode.com/punbb//viewtopic.php?pid=80158

jnpcl
Yea, that would work, but it requires editing the TinyMCE source, which I would rather not do.
rr
A: 

After digging around a bit, it seems that you cannot configure the editor directly with a height below 100px. There is a workaround using the editor init callback to manually set the height. See http://tinymce.moxiecode.com/punbb/viewtopic.php?id=10015 for details.

tinyMCE.init({
    ...,
    setup: function(editor) {
        editor.onInit.add(function() {
            var width = editor.getWin().clientWidth;
            var height = 50;

            editor.theme.resizeTo(width, height);
        });
    }
});
rr