tinymce增加字号设置

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增加字号设置)