nightjarnz

SS bundles it's own plugins, you can use them for reference. sslink and various extensions to it :)

theruss

You may have more luck posting in the #ss4 channel though 🙂

💯 (1)
theruss

You then pass that to HTMLEditorField::setEditorConfig()

theruss

It's basically a PHP wrapper around JS editor functionality

theruss

Have a look at TinyMCEConfig. You can now set a custom config on a per TinyMCE instance basis.

Rafael Marins

I guessing I'm missing a few things in the js, but I can't find much about SS tinymce js plugins, the above is just based on tinymce docs

Rafael Marins

Could anyone give me a hand of creating a new TinyMCE plugin for my SS site ? I've been trying to add one, but doesn't seem to work.

  1. $stdEditor->enablePlugins(['highlight' => '/public/static/js/highlight.js']);

including my static js like this then

  1. $stdEditor->addButtonsToLine(1, ['blockquote', 'highlight']);

and js

  1. tinymce.init({
  2. selector: "textarea#Form_EditForm_Content",
  3. setup: function(editor) {
  4. editor.ui.registry.addButton("highlightbutton", {
  5. icon: "highlight-bg-color",
  6. tooltip: "Highlight text",
  7. onAction: function(_) {
  8. editor.insertContent(
  9. "<span class='highlight'>" +
  10. editor.selection.getContent() +
  11. "</span>"
  12. );
  13. }
  14. });
  15. }
  16. });