加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

twitter-bootstrap – 自定义WYSIHTML5工具栏

发布时间:2020-12-18 00:24:44 所属栏目:安全 来源:网络整理
导读:如何在 WYSIHTML5中自定义工具栏.我想禁用字体大小和图像插入按钮,特别是对于Bootstrap X-editable中使用的WYSIHTML5版本. 解决方法 如果您碰巧使用 bootstrap-wysiwyg/bootstrap3-wysiwyg(例如gem bootstrap-wysihtml5-rails使用),从3.0版开始,您需要将其嵌
如何在 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
  }
});

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读