How to use plugins from TinyMCE in Vaadin?

32 views Asked by At

I am using TinyMCE for Flow, since I work with Vaadin 14. I am trying to use the auto save plugin for TinyMCE. It requires this setup in a .js file:

tinymce.init({

selector: 'textarea',

plugins: 'autosave',

toolbar: 'restoredraft'

});

But it seems like there is no such javascript settings file in Tiny MCE for Flow. So is it possible to use plugins from TinyMCE in Vaadin?

1

There are 1 answers

2
Simon Martinelli On

Assuming you are using https://vaadin.com/directory/component/tinymce-for-flow you can configure it in Java like this:

TinyMce tinyMce = new TinyMce();
tinyMce.configurePlugin(true, Plugin.TABLE)
       .configureMenubar(true, Menubar.TABLE)
       .configureToolbar(true, Toolbar.TABLE);

Just look at constants ou have to use.