Hi.
How to get RichTextEditor’s text in vaadin 13? getValue() function doesn’t give its text.
rte.getValue()
does give the value, but it’s in Delta format. See more here: https://vaadin.com/components/vaadin-rich-text-editor/ and here: https://github.com/quilljs/delta/ . You can also use rte.getHtmlValue()
to get the HTML representation, but that’s read-only (you can’t setValue() with HTML).
Olli Tietäväinen:
rte.getValue()
does give the value, but it’s in Delta format. See more here: https://vaadin.com/components/vaadin-rich-text-editor/ and here: https://github.com/quilljs/delta/ . You can also userte.getHtmlValue()
to get the HTML representation, but that’s read-only (you can’t setValue() with HTML).
Thank you, Olli!
how I can set value in rich text editor or how i can create the DeltaValue server side?
I guess usually it’s easier to use richTextEditor.asHtml().setValue(htmlValue)
, which has been introduced since the earlier messages in this thread.