voidlabs / mosaico

Mosaico - Responsive Email Template Editor
https://mosaico.io
GNU General Public License v3.0
1.71k stars 504 forks source link

Pass dynamic values to custom TinyMCE toolbar button #414

Closed marco-krammer closed 6 years ago

marco-krammer commented 6 years ago

Hello, we are trying to add a custom button to the TinyMCE toolbar which includes a custom submenu for all available value placeholders which are going to be parsed when an e-mail is sent out. We managed to add such button with static values in the wysiwygs.js file directly in TinyMCE's options, but didn't manage to pass a list of available variables from our database to TinyMCE and the submenu of this button. What would you suggest for passing dynamic values to a TinyMCE button? We also tried writing a custom TinyMCE plugin which didn't work out as we wanted.

bago commented 6 years ago

Have a look at this issues and related issues: https://github.com/voidlabs/mosaico/issues/310

marco-krammer commented 6 years ago

@bago Thank you! Doing it like described in the issue worked