where in the joomla backend can I extend the TinyMCE editor? Im trying to add this plugin to the tinymce editor in my joomla install. This plugin requires that I set specific options in the tinymce init function. Im not even sure where to run this function :
tinymce.init({
selector: "textarea",
//inline: true, //for contenteditable selector
forced_root_block : "", //!important
force_br_newlines : true, //!important
force_p_newlines : false, //!important
valid_elements: "br", //!important
paste_as_text: true, //!important
external_plugins: {
twExoticMarkdownEditor: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twExoticMarkdownEditor.js", //!important
bubbleBar: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/tinymceBubbleBar.js", //!important
twPreCodeManager: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twPreCodeManager.js",
modxMagicHoverLink: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/modxMagicHoverLink.js",
},
twExoticMarkdownEditorSettings: {
addClass: false, //default is true (add .twExoticMarkdownEditor class to editor body)
removeClasses: "a b c", // remove class(es) when editor loads - smoothly reveal editor only after text has been prepared
skipClass: "", // do not process this particular editor content, skip it!
addAttr: false, //default is true (add markdown="1" to editor body) good for parsing mixed content in mark/parsedownExtra
},
plugins: "paste contextmenu save searchreplace", //!important
toolbar: "modxMagicHoverLink twPreCodeManager boldMD italicMD linkMD imageMD blockquoteMD codeMD numlistMD bullistMD tableMD undo redo searchreplace bubbleBarOptionsButton", //!important
menubar: false,
contextmenu: "modxMagicHoverLink twPreCodeManager boldMD italicMD linkMD imageMD blockquoteMD codeMD numlistMD bullistMD tableMD undo redo searchreplace template" //!important
})
Labels |
Added:
?
|
Category | ⇒ | com_plugins |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-20 10:04:21 |
Closed_By | ⇒ | brianteeman |
What about a feature request?
Perhaps it would be beneficial to add a "custom plugin settings" field after "custom plugins" in the backed UI. Just a simple text box where the code for plugin settings can be typed in manually. Then that code gets added to the end of the init call parameter.
Unfortunately its not that easy due to the way that tinymce works
If all you want is a markdown editor then there are several available https://extensions.joomla.org/extensions/extension/?searchall=markdown&filter%5Btags%5D%5B%5D=&filter%5Bcore_catid%5D=&filter%5Bincludes%5D=&filter%5Bversions%5D=&filter%5Btype%5D=&filter%5Bhasdemo%5D=&filter%5Bnewupdated%5D=&filter%5Bscore%5D=&dir=DESC&limitstart=&controller=filter&view=extension&layout=list&Itemid=145&clearorders=0&clearfilters=1
Adding extra plugins is not something that is fully supported. You can add a plugin using the penultimate field on the tinymce plugin called "Custom plugin" but I think that only allows you to add the plugin name and not the params you need. For that you would need to edit one of the core files and the danger there is that you will lose any changes on an update. The forum is the best place to ask this see https://forum.joomla.org