TinyMCE编辑器不具备所有功能

时间:2017-03-31 10:43:58

标签: javascript asp.net-mvc tinymce

我在我的网站上使用了TinyMCE编辑器作为我的文本框,我按照https://www.tinymce.com/docs/get-started/first-steps/进行了操作,它运行正常,但问题是我没有所有功能。我的就像下图 enter image description here

但这是我所期待的

enter image description here

1 个答案:

答案 0 :(得分:2)

以下是您可以使用的完整功能(高级插件除外):https://www.tinymce.com/docs/demo/full-featured/。您可能需要根据需要修改menubarpluginstoolbar

tinymce.init({
  selector: 'textarea',
  height: 500,
  theme: 'modern',
  plugins: [
    'advlist autolink lists link image charmap print preview hr anchor pagebreak',
    'searchreplace wordcount visualblocks visualchars code fullscreen',
    'insertdatetime media nonbreaking save table contextmenu directionality',
    'emoticons template paste textcolor colorpicker textpattern imagetools codesample toc'
  ],
  toolbar1: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
  toolbar2: 'print preview media | forecolor backcolor emoticons | codesample',
  image_advtab: true,
  templates: [
    { title: 'Test template 1', content: 'Test 1' },
    { title: 'Test template 2', content: 'Test 2' }
  ],
  content_css: [
    '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
    '//www.tinymce.com/css/codepen.min.css'
  ]
 });