Commit c853bb3 1 parent 72dd27a commit c853bb3 Copy full SHA for c853bb3
File tree 1 file changed +21
-0
lines changed
src/test/java/org/vaadin/tinymce
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org .vaadin .tinymce ;
2
+
3
+ import com .vaadin .flow .component .orderedlayout .VerticalLayout ;
4
+ import com .vaadin .flow .router .Route ;
5
+
6
+ @ Route
7
+ public class AutoSavePluginExample extends VerticalLayout {
8
+
9
+ public AutoSavePluginExample () {
10
+ TinyMce tinyMce = new TinyMce ();
11
+ tinyMce .configurePlugin (true , Plugin .AUTOSAVE )
12
+ // TODO add constant
13
+ .configure ("toolbar" , "restoredraft" )
14
+ // save more eagerly for demo
15
+ .configure ("autosave_interval" ,"5s" )
16
+ // Default by tinymce uses id of editor, which happens to be random
17
+ // byfault for this integration
18
+ .configure ("autosave_prefix" , "tinymce-autosave-myfield-id" );
19
+ add (tinyMce );
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments