美文网首页
tinymce增加字号设置

tinymce增加字号设置

作者: hhooke | 来源:发表于2018-10-15 15:35 被阅读0次

    toolbar1字段增加fontsizeselect

    如增加前:

    toolbar1:  " newnote print preview | undo redo ",
    

    增加后:

    toolbar1:  " newnote print preview | undo redo | fontsizeselect",
    

    然后添加fontsize_formats属性:

    fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt",
    

    如下是比较完整的配置信息

    tinymce.init({
          selector: "#articleEditor",
          branding: false,
          elementpath: false,
          height: 600,
          language: "zh_CN.GB2312",
          menubar: "edit insert view format table tools",
          theme: "modern",
          plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak imagetools",
            "searchreplace visualblocks visualchars code fullpage",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons paste textcolor colorpicker textpattern imagetools codesample"
          ],
          toolbar1:
            " newnote print preview | undo redo | insert | styleselect | forecolor backcolor bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image emoticons media codesample | fontsizeselect",
          autosave_interval: "20s",
          fontsize_formats: "8pt 10pt 12pt 14pt 18pt 24pt 36pt",
          image_advtab: true,
          table_default_styles: {
            width: "100%",
            borderCollapse: "collapse"
          }
        });
    

    相关文章

      网友评论

          本文标题:tinymce增加字号设置

          本文链接:https://www.haomeiwen.com/subject/vavfzftx.html