javascript - 使用jquery调整tinymce大小

标签 javascript jquery html tinymce rte

这是代码:

tinyMCE.init({
    mode: "textareas",
    theme: "advanced",
    plugins: "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

    // Theme options
    theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
    theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
    theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
    theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
    theme_advanced_toolbar_location: "top",
    theme_advanced_toolbar_align: "left",
    theme_advanced_statusbar_location: "bottom",
    theme_advanced_resizing: true,
    theme_advanced_resize_horizontal : false,

    skin: "o2k7",
    skin_variant: "silver",

    content_css: "css/example.css",

    template_external_list_url: "js/template_list.js",
    external_link_list_url: "js/link_list.js",
    external_image_list_url: "js/image_list.js",
    media_external_list_url: "js/media_list.js",

});

用户可以用鼠标调整其大小。然而,刷新页面后,我希望tinymce具有固定的大小,而不是用户给它的大小。如何给它固定的大小?

最佳答案

尝试将此行代码添加到tinyMCE配置

theme_advanced_resizing_use_cookie : true

关于javascript - 使用jquery调整tinymce大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9887405/

相关文章:

javascript - 如何在除具有给定 ID 的一个文本区域之外的所有文本区域上启用 nicEdit?

javascript - 网站加速,加载其他网页资源?

javascript - 使用选项卡式内容滚动页面

javascript - jQuery - 如何在两种情况下进行粘性导航 'stick'?默认情况下,并且顶部面板 div 展开

html - MVC 中的样式下拉列表

javascript - 对数组进行分组和求和

javascript - jquery:SyntaxError: 未终止的字符串文字

jquery - 在 jQuery 中突出显示带有(和不带有)重音字符/变音符号的单词

JavaScript 顶部工具栏

html - CSS: Center Center Alignment 和 Div 来 overflow hidden 的图像