I just tested multiple VaadinCKEditors on the same page and tried to react on value changes directly as the user edits the text in the editor (like Vaadins ValueChangeMode.EAGER on TextFields). In my opinion, the best approach should be to use the provided Autosave-Feature because the editor itself updates its value only on blur (as far as I noticed).
The problem I'm facing right now is, the AutosaveAction is registered globally/statically (not like events on a specific instance) and I can't seem to find a way to identify which editor changed.
The docs show some kind of editorId provided to the AutosaveAction but that seems outdated, because the current code does not provide any editorId.
VaadinCKEditorAction.registerAction(VaadinCKEditorAction.AUTOSAVE, new AutosaveAction() { @Override public void accept(String editorId, String editorData) { System.out.println("My new save action"); } });
I'm using Version 4.0.0
My Questions:
- Was the editorId removed consciously? Why?
- Is there another (recommended) way to get the value of a editor-instance eagerly?