我有一个基本的 TinyMCE 设置,我正在尝试创建一个“流动”工具栏,如果工具栏太小,按钮会下拉到下一行。我在一个表格行中有所有按钮:
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,imagemanager,filemanager",
theme_advanced_buttons1 : "bold,italic,justifyleft,justifycenter,justifyright,justifyfull,"
+"styleselect,formatselect,fontselect,fontsizeselect,bullist,numlist,link,unlink,image,pdw_toggle,"
+"pastetext,pasteword,search,replace,outdent,indent,blockquote,undo,redo,code,forecolor,backcolor,"
+"tablecontrols,hr,removeformat,visualaid,sub,sup,charmap,emotions,media,advhr,print,ltr,rtl,fullscreen,"
+"cite,abbr,acronym,del,ins,attribs,visualchars,nonbreaking,template,blockquote,insertfile,insertimage,underline,strikethrough",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
width: "100%",
height: "400"
});
我已经尝试了各种CSS 来实现这一点,我不确定为什么这不起作用:
.mceToolbar tr {
display:block !important;
width:100% !important;
}
.mceToolbar td {
clear:none !important;
display:block !important;
float:left !important;
}
我正在寻找的是这样的(调整输出窗格的大小):http: //jsfiddle.net/vKTcq/
你可以在这里试验我的 TinyMCE 演示:http: //fiddle.tinymce.com/aecaab/1
我知道我以前只用 CSS 做过这个,所以我很确定这是可能的 - 我似乎无法弄清楚。有任何想法吗?