sebastienheyd / boilerplate

Laravel AdminLTE 3 Boilerplate package with blade components, users, roles and permissions management
MIT License
219 stars 66 forks source link

On change event for tinymce? #70

Closed cod3rshotout closed 2 years ago

cod3rshotout commented 2 years ago

The component tinyMCE is binded to the window using:

`window.{{ 'MCE_' . \Str::camel($id) }} = tinymce.init({`

but could you please tell me how can I use that instance? Eg: suppose that I want bind the on change event, how can I do this?

Thanks

cod3rshotout commented 2 years ago

I added this line to tinymce.blade.php (async) folder, I'm not sure why there is the same content in the load folder but is not used.

 registerAsset('tinymce', () => {

Then when I have to bind an event:

whenAssetIsLoaded('tinymce', function() {

    tinyMCE.activeEditor.on('keyup', function(ed, e) {
        console.log(true);
    });
})