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"
      }
    });
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章