Category Archives: TinyMCE Rich Text Box

Customize tinymce in Voyager

Add additional_js:

https://docs.laravelvoyager.com/customization/additional-css-js

‘js/custom.js’ => ‘public/js/custom.js’

Add callback function in additional js:

https://docs.laravelvoyager.com/customization/tinymce

Rename or copy plugin.min.js to plugin.js

TinyMCE will find plugin.js of each plugins in public\vendor\tcg\voyager\assets\js\plugins
https://www.tiny.cloud/docs/advanced/creating-a-plugin/

Example:

 

Reference:

  1. https://github.com/the-control-group/voyager/issues/1945
  2. Remove doctype and html tags that generated by tinymce automatically: Remove fullpage plugin.
    https://stackoverflow.com/questions/17829239/how-can-i-stop-tinymce-from-adding-doctype-htmlhtmlhead-headbody-to-e
  3. https://stackoverflow.com/questions/6266487/tinymce-allow-all-html-tag
  4. https://stackoverflow.com/questions/7744903/tinymce-allow-data-attribute