voidlabs / mosaico

Mosaico - Responsive Email Template Editor

Home Page:https://mosaico.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding custom buttons at runtime to WYSIWYG (tincyMCE) editor via mosaico plugin

evdmeer opened this issue · comments

I am working on adding functionality in the TinyMCE editor inside mosaico that requires custom buttons in the editor.
The buttons are different for each different user etc, so they must be added at runtime.

The official way to do add a button to TinyMCE is to add them in the setup function during init().

Is there a way to add custom buttons at page load with only using a mosaico plugin and without making changes to the source?
I have seen some comments on issues here on github that indicate that it should be possible, but so far I have not been able to get it to work.

I know I can change the wysiwyg.js file to include a call to a custom function that adds them, but I want to try to do it while changing as little source as possible, as every customization has the possibility to introduce unwanted problems.

commented

Have a look at those tickets:
#178 #247 #239 #194
And this page about plugins:
https://github.com/voidlabs/mosaico/wiki/Mosaico-Plugins