我正在使用基础框架创建一个响应式站点,当页面缩小时,TinyMCE会破坏格式(它没有响应).如何使TinyMCE响应?
我在高级主题中使用TinyMCE.今天我必须事先指定每个工具栏行中的按钮:theme_advanced_buttons1,theme_advanced_buttons2和theme_advanced_buttons3.
有没有办法只指定一个按钮列表,如果编辑器的宽度太小而无法将它们全部包含在一行中,那么按钮会换行到下一行?
我有一个基本的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"
});
Run Code Online (Sandbox Code Playgroud)
我已经尝试过各种各样的CSS来实现这一目标,我不知道为什么这样做不起作用:
.mceToolbar tr {
display:block !important;
width:100% !important;
}
.mceToolbar td {
clear:none !important;
display:block !important;
float:left !important;
}
Run Code Online (Sandbox Code Playgroud)
我正在寻找的是这样的事情(调整输出窗格的大小):http://jsfiddle.net/vKTcq/
您可以在此处试验我的TinyMCE演示:http://fiddle.tinymce.com/aecaab/1
我知道我之前只用CSS做过这个,所以我很确定它是可能的 - 我似乎无法弄明白.有任何想法吗?