简体   繁体   中英

TinyMCE autoresize plugin not works

I want to reproduce this simply behaviour :

http://tinymcesupport.com/tutorials/autoresize-automatic-resize-plugin

This is my init:

 <!-- TinyMCE -->
        <script type="text/javascript" src="js/jscripts/tiny_mce/tiny_mce.js"></script>
        <script type="text/javascript">
            tinyMCE.init({
                mode : "exact",
                elements : "pagina_testo_colonna1,pagina_testo_colonna2,pagina_testo_colonna3",
                theme : "advanced",
                plugins:"paste,autoresize",
                plugin_preview_width : "100%",
                width : "100%",
                theme_advanced_buttons1 : "pastetext,|,bold,italic,underline,strikethrough,|,bullist,numlist,|,indent,outdent,|,undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,charmap",
                theme_advanced_buttons2 : "",
                theme_advanced_buttons3 :"",
                theme_advanced_disable : "image,anchor,cleanup,help,code,hr,removeformat,sub,sup",
                theme_advanced_resizing : true,
                paste_text_use_dialog : true,
                relative_urls : false,
                remove_script_host : false

            });
        </script>
        <!-- /TinyMCE -->

i have added "autoresize" to plugins list but my editors not resize while i writing, they simply scroll. I have multiple editor in the same page. What's wrong with my code?

 <script type="text/javascript">
            tinyMCE.init({
                mode : "exact",
                elements : "pagina_testo_colonna1,pagina_testo_colonna2,pagina_testo_colonna3",
                theme : "advanced",
                plugins:"paste,autoresize",
                plugin_preview_width : "100%",
                width : "100%",
                theme_advanced_buttons1 : "pastetext,|,bold,italic,underline,strikethrough,|,bullist,numlist,|,indent,outdent,|,undo,redo,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,charmap",
                autoresize_min_height : "100px",
                autoresize_max_height : "500px",
                theme_advanced_buttons2 : "",
                theme_advanced_buttons3 :"",
                theme_advanced_disable : "image,anchor,cleanup,help,code,hr,removeformat,sub,sup",
                theme_advanced_resizing : true,
                paste_text_use_dialog : true,
                relative_urls : false,
                remove_script_host : false

            });
        </script>

To works i have to set the parameters autoresize_min_height : "100px",autoresize_max_height : "500px",

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM