0

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 Answer 1

0

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.

Sign up to request clarification or add additional context in comments.

2 Comments

I use Vaadin 14 and the configurePlugin method is not available there. The setConfig(String jsonConfig) method is used instead. A string containing "autosave" is used here, containt this text and more: +"\"plugins\": \"paste fullpage searchreplace fullscreen charmap insertdatetime lists textcolor textpattern link spellchecker autosave code help\" ," +"\"autosave_ask_before_unload\": \"true\" ," But the autosave plugin does not work like it should. Do we have to upgrade to a later Vaadin version for the autosave plugin to work? Then we would be able to use the configurePlugin method.
I found this tutorial, but they use regular TinyMCE and not TinyMCE for Flow: trycatchdebug.net/news/1167996/tinymce-autosave-in-vaadin-14

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.