Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TinyMCE editor fixed size with no scrollers?

Tags:

editor

tinymce

At the moment I have this:

    tinyMCE.init({
// General options
mode : "exact",
elements : "fkField, lkField, ukcField, khField",
theme : "advanced",
plugins : "table",
width : "300",
height: "185",
// Theme options
theme_advanced_buttons1 : "fontsizeselect, bold,italic,underline,bullist, cleanup, |,justifyleft,justifycenter,justifyright",
theme_advanced_buttons2 : "tablecontrols", 
theme_advanced_buttons3 : "", 
theme_advanced_buttons4 : "", 

theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "center",
theme_advanced_resizing : false
    });

This gives me a editor with the size of 300x185.

Now in this editor, I would like to do so you can only write until the editor is full. (without the scroller)

So you are unable to enter more text, and the scroller should not appear (disable scrolling)

Right now you can at the bottom of inside the editor just make new line and it will add the scroller <- which i do not want to happen

How can i do this? Is this unpossible? I have made research for some time now, but maybe it's just me searching wrong..

Thanks

like image 865
Karem Avatar asked Nov 14 '22 16:11

Karem


1 Answers

add in a ccs file the following code

.mceContentBody{
         overflow-y:hidden!important;
      }

and add the path of css file in content_css attribut of tinymce

content_css : /path/to/css/file.ss
like image 185
Abdennour TOUMI Avatar answered Dec 29 '22 00:12

Abdennour TOUMI