How can I set the height of a tinymce text area?

tinymce set height dynamically
tinymce height not working
tinymce set content
tinymce skin
tinymce change theme
tinymce sticky toolbar
tinymce menu
tinymce help

I am using the following:

    <textarea
    data-ui-tinymce="tinymceOptions"
    data-ng-disabled="modal.action=='delete'"
    data-ng-model="modal.formData.text"
    id="inputText"
    rows="20"
    required></textarea>

When the tinymce appears the height is just a few centimeters. How can I change the height of the default when it first appears?

Here is a list of the options I am using:

selector: "textarea",           
plugins: [
                        "advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
                        "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                        "table contextmenu template textcolor paste fullpage textcolor"
                ],

                toolbar1: "bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect fontselect fontsizeselect",
                toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | code | inserttime preview | forecolor backcolor",
                toolbar3: "table | hr removeformat | subscript superscript | charmap | print fullscreen | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",

                menubar: false,
                toolbar_items_size: 'small',

                templates: [
                        {title: 'Test template 1', content: 'Test 1'},
                        {title: 'Test template 2', content: 'Test 2'}

]


You should set height of container object in CSS:

#inputText {
    height : 10000000px;
}

tinymce.init({ selector: "textarea", // change this value according to your HTML This option allows you to specify the size of the padding at the bottom of the  The solution I was able to use is setting the height on the container in the active editor: editorinstance.container.style.height = '1000px' – Adam Elders Jul 10 at 17:45. EDIT: Nevermind, the above only works when you have the autoresize plugin enabled.


from javascript

tinymce.init({
   selector: 'textarea',
   height: 200
});

OR from html

<textarea style="height: 200px;">

Under the hood: You can see string like "height": 120, in data-mce-conf attribute of the generated HTML for the textarea. Otherwise, something goes wrong. Add this css to your custom style sheet otherwise it will decrease all existing editors' height. Changing editor height and width. A common UI customization used by developers is changing the height and width of the editable area. The following examples are code snippets that change TinyMCE’s height and width. Note: The links below contain specific details of these customization options. Set the editable area height


for tinyMCE version before 4.X then this code is working

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

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

for tinyMCE version 4.X and after then this code is working

tinyMCE.init({
   setup: function (ed) {
      ed.on('init', function(args) {
         var id = ed.id;
         var height = 25;

         document.getElementById(id + '_ifr').style.height = height + 'px';
      });
   }
});

I'm confused. You asked about CKEditor, however your code suggest you're using TinyMCE. They're completely different editors, although they both support  height. height sets the height of the entire editor, including the menu bar, toolbars, and status bar. Note: If a number is provided, TinyMCE sets the height in pixels. If a string is provided, TinyMCE assumes the value is valid CSS and simply sets the editor’s height as the string value.


It works for me (see setTimeout part)

$(function () {
    window.init_tinymce = function (id, custom_config) {
        var textarea = $('#' + id);

        // Default TinyMCE configuration
        var basic_config = {
            mode: 'none',
            plugins: "link",
            menu: 'none',
            toolbar: 'bold | formatselect | link'
        };

        tinymce.init($.extend(basic_config, custom_config));
        ...

        setTimeout(function(){ //wait for tinymce to load
            console.log('timeout');
            $(tinymce.editors[0].iframeElement).contents().find('body')
                .css('min-height', $(tinymce.editors[0].contentAreaContainer).height() * .9);
        }, 1000);
    };
});

https://www.tinymce.com/docs/configure/editor-appearance/. Ex: tinymce.init({ selector: 'textarea', // change this value according to your HTML Important detail if you are trying to dynamically initialize a TinyMCE textarea.. – Henrik Apr 30 '16 at 15:02 For other people who read this: I was running TinyMCE 4.0.28, which required me to change mceAddControl to mceAddEditor .


For global height setting for TinyMCE, edit settings.py of Django project:

TINYMCE_DEFAULT_CONFIG = {'height': 120}

For per-widget settings, use mce_attrs in form class:

input = forms.CharField(widget=TinyMCE(mce_attrs={'height': 120}))

Tested with django-tinymce 2.7.0.

Under the hood: You can see string like &quot;height&quot;: 120, in data-mce-conf attribute of the generated HTML for the textarea. Otherwise, something goes wrong.

Hey, Can i style the TinyMCe editor so that it is a specific width? <textarea name='txt_message' style='width:501px; height: 161px;'></textarea></td> </tr> <tr​><td> </td></tr> Hi, can you put this online somewhere? How can I disable/enable editing a tinymce textarea in javascript? I think i have something wrong with my components. All the solutions I have found on internet, don't work on my side.


TinyMCE uses the height of the textarea it's applied to, so if you made a textfield with CCK you could set the height to 20 'rows', or you could  tinymce.init( { selector: "textarea", menu: { format: { title: "Format", items: "forecolor backcolor" } }, toolbar: "forecolor backcolor" }); These settings affect the execution of the textcolor. The dimensions and mapping of the grid of text colors can be set here. This option allows for specifying the number of columns for text color grids


Hi , I want to increase Tinymce text area heght by 50% , where and how can i It's pretty **** easy to fix the DCTs - you could even write a Perl script to do it if  Open Questions. get contents compatible with WORD formatting Sun May 17 09:24:23 GMT 2020; laravel + vue integration Fri May 15 12:52:30 GMT 2020; How to adapt the HTML code for Accelerated mobile pages (AMP) Fri May 15 02:08:06 GMT 2020


<style type="text/css"> html <textarea id="content" name="content" the autoresize plugin (makes no difference), and setting the height (as in  I am using tinymce, I have multiple text areas on my page. Is it possible to apply for only one textarea, 1 text area is for description validation is like below