-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
Impact: LowSeverity: MajorbugSomething isn't workingSomething isn't workingvaadin-rich-text-editorworkaround
Description
Description
When using the value change modes lazy or timeout, it is not possible to set an initial delta value via asDelta().setValue(myDelta) . The RTE stays empty.
A workaround is to delegate the setting:
editor.getElement()
.executeJs("")
.then(_unused -> editor.asDelta().setValue(initialValue));
Expected outcome
All value change modes should work.
Minimal reproducible example
@Route("")
public class RteView extends VerticalLayout {
public RteView() {
var editor = new RichTextEditor();
editor.setValueChangeMode(ValueChangeMode.LAZY);
editor.asDelta().setValue("[" +
"{\"insert\":\"Stock \"}," +
"{\"insert\":\"RTE\",\"attributes\":{\"bold\":true}}," +
"{\"insert\":\" from Vaadin 25\\n" +
"This is the unmodified Vaadin Rich Text Editor for comparison.\\n\"}" +
"]");
}
}Steps to reproduce
Download a starter, add the view and load the app. The RTE stays empty.
Remove the value change mode and it works.
Environment
Vaadin version(s): 25.0.6
OS: Kubuntu 25
Browsers
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Impact: LowSeverity: MajorbugSomething isn't workingSomething isn't workingvaadin-rich-text-editorworkaround