如何自定义WYSIHTML5中的工具栏。我想禁用字体大小和图像插入按钮,特别是在Bootstrap X-editable中使用的WYSIHTML5版本。自定义WYSIHTML5工具栏
6
A
回答
3
你可以做到这一点通过CSS
ul.wysihtml5-toolbar li a[title="Insert image"] { display: none; }
ul.wysihtml5-toolbar li.dropdown { display: none; }
12
可以使用启动参数禁用工具栏选项:
$('#[YOUR INPUT ID]').wysihtml5({
"font-styles": false, //Font styling, e.g. h1, h2, etc.
"emphasis": true, //Italics, bold, etc.
"lists": true, //(Un)ordered lists, e.g. Bullets, Numbers.
"html": true, //Button which allows you to edit the generated HTML.
"link": true, //Button to insert a link.
"image": false, //Button to insert an image.
"color": true //Button to change color of font
});
此信息应在标签粘贴:
<head>
<script> HERE </scrip>
</head>
13
如果您碰巧使用bootstrap-wysiwyg/bootstrap3-wysiwyg(例如,由宝石bootstrap-wysihtml5-rails使用),s因斯3.0版本,则需要其嵌套工具栏里面:
$('#some-textarea').wysihtml5({
toolbar: {
"font-styles": true, // Font styling, e.g. h1, h2, etc.
"emphasis": true, // Italics, bold, etc.
"lists": true, // (Un)ordered lists, e.g. Bullets, Numbers.
"html": false, // Button which allows you to edit the generated HTML.
"link": true, // Button to insert a link.
"image": true, // Button to insert an image.
"color": false, // Button to change color of font
"blockquote": true, // Blockquote
"size": <buttonsize> // options are xs, sm, lg
}
});
相关问题
- 1. 自定义markitUp工具栏
- 2. WPF自定义工具栏
- 3. SSMS工具栏自定义
- 4. CKEditor定义自定义工具栏
- 5. X编辑和引导,wysihtml5工具栏配置数据wysihtml5
- 6. WPF中的可自定义工具栏
- 7. CKEditor自定义工具栏配置
- 8. 自定义工具栏问题
- 9. 自定义材质设计工具栏
- 10. 自定义sencha触摸工具栏
- 11. 带图像的自定义工具栏
- 12. 如何自定义XCode工具栏?
- 13. 自定义ITHIT AjaxFilebrowser工具栏
- 14. 自定义工具栏重叠片段
- 15. RibbonGroup'自定义工具栏'OfficeID?
- 16. 自定义工具栏设计
- 17. Firefox自定义工具栏按钮
- 18. 如何自定义ckeditor的工具栏
- 19. 自定义工具栏的Android
- 20. CKEditor的多个自定义工具栏
- 21. 自定义工具栏Kendo Grid
- 22. 无法自定义django-ckeditor工具栏
- 23. 工具栏溢出自定义字体
- 24. CKEditor自定义工具栏WITH config.extraPlugins
- 25. 更改自定义工具栏文本
- 26. MS AJAX HTMLEditor - 自定义工具栏
- 27. BlackBerry - 自定义菜单工具栏
- 28. Wordpress自定义补充工具栏
- 29. 的Android DrawerLayout与自定义工具栏
- 30. 添加自定义TinyMCE工具栏
这就是答案.......非常感谢 – GhostRider
这对我来说工作..谢谢 –