You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm porting a Laravel app from Voyager (https://github.com/the-control-group/voyager) to Nova. I have a custom javascript function tinymce_setup_callback(editor) in my Voyager app that creates a toolbar button for TinyMCE, but I'm having some trouble replicating it in Nova.
I've tried editing the FormField.vue component to run this.loaded method onInit, but the button doesn't appear.
In my options array I have:
I know the loaded method runs because if I use editor.addButton I get an error in the console:
Error: editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton
I expect the loaded method is running the tinymce component is initialised so it's too late to add the button but I can't figure out how to get it in there during init/setup.
Ok so I got it working but it's a bit of a hack. The editor now uses initObj returned by the data function, which joins the setup function with the options array.
I also had to change onclick to onAction (new in TinyMCE v5).
I'm not sure if there is a way to put the setup function in the options array from my Nova resource.
I'm porting a Laravel app from Voyager (https://github.com/the-control-group/voyager) to Nova. I have a custom javascript function tinymce_setup_callback(editor) in my Voyager app that creates a toolbar button for TinyMCE, but I'm having some trouble replicating it in Nova.
I've tried editing the FormField.vue component to run this.loaded method onInit, but the button doesn't appear.
In my options array I have:
I know the loaded method runs because if I use editor.addButton I get an error in the console:
I expect the loaded method is running the tinymce component is initialised so it's too late to add the button but I can't figure out how to get it in there during init/setup.
The text was updated successfully, but these errors were encountered: