twitter-bootstrap - 自定义 WYSIHTML5 工具栏

标签 twitter-bootstrap wysihtml5 x-editable

WYSIHTML5中如何自定义工具栏.我想禁用字体大小和图像插入按钮,特别是对于 Bootstrap X-editable 中使用的 WYSIHTML5 版本。

最佳答案

如果你碰巧使用 bootstrap-wysiwyg/bootstrap3-wysiwyg (例如 gem bootstrap-wysihtml5-rails 使用),从 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
  }
});

关于twitter-bootstrap - 自定义 WYSIHTML5 工具栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18305497/

相关文章:

css - WYSIHTML5如何输出内联CSS?

ajax - wysihtml5 - 设置值不起作用,因为 'sandbox iframe isn' 还没有加载'

javascript - x-可编辑: turn off inline editing for non admin users

wordpress - 如何将 wp_nav_menu() WordPress 与 Bootstrap 下拉菜单布局集成

html - Bootstrap 3 的平带

javascript - 推特 Bootstrap 模式不显示远程图像

javascript - 添加 'hidden' 类时使 bootstrap div 淡出

jquery - 使用 WYSIHTML5 和 jQuery 将文本附加到文本区域

javascript - x-editable + bootstrap 3 + Twitter typeahead.js 不工作

javascript - x 可编辑行内的可编辑 list