How to put Code Sample Plugin of TinyMCE in phpfox?

北城余情 提交于 2020-02-02 13:56:32

问题


I have an tiny mce editor like image bellow:

and I want to put Code Sample Plugin of tinymce editor in phpfox like:

Please tell me what should I do.


回答1:


  1. In case you don't have codesample installed, you can download entire bundle from tinymce.com and include plugin.min.js from directory js/tinymce/plugins/codesample/

  2. Download prism.js and prism.css from prismjs.com and include in your HTML page

  3. Modify your tinymce_setup.js and add codesample to your tinymce_setup.js My tinymce_setup.js looks like

tinymce.init({
  selector: 'textarea',
  height: 500,
  plugins: [
    'advlist autolink lists link image charmap print preview anchor',
    'searchreplace visualblocks code fullscreen',
    'insertdatetime media table contextmenu paste code codesample'
  ],
  toolbar: ("insertfile undo redo | styleselect | bold italic | " +
            "alignleft aligncenter alignright alignjustify | " +
            "bullist numlist outdent indent | link image table | " +
            "code fullscreen codesample"),
});


来源:https://stackoverflow.com/questions/34131657/how-to-put-code-sample-plugin-of-tinymce-in-phpfox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!