1
votes

I have an tiny mce editor like image bellow:

enter image description here

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

enter image description here

Please tell me what should I do.

1
what have your tried so far?Blip
I put the tiny editor in my phpfox project, it's work, but it isn't have code sample i'm tries to use the latest version of tiny editor is 4.3.1Xuân Hiển Ngô

1 Answers

2
votes
  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"),
});