emilianotisato / nova-tinymce

Laravel Nova TinyMCE editor (with images upload capabilities!)
MIT License
116 stars 38 forks source link

Callback Functions in Config #56

Open temp1029 opened 3 years ago

temp1029 commented 3 years ago

Is there a known way to include callback functions in the config?

I am asking because several plugins have options which allow a callback to be provided. One example is the media plugin which has the options 'media_url_resolver' and 'video_template_callback'.

Maybe I'm missing something simple here, but from what I can see the options are passed directly to the vue element as a json string via the init prop.

This might really be an issue for the tinymce-vue team, but since we'd also need to convert the function from PHP to json I figured I'd start here.

temp1029 commented 3 years ago

Ah, looks like this might need to be handled in a similar way to LFM.

Any chance a PR would be accepted for this if I can up with one for the media plugin callbacks?