vaadin 23 - Rich Text Editor set html content not working

just run example from Vaadin page:
https://vaadin.com/docs/latest/components/rich-text-editor

`RichTextEditor rte = new RichTextEditor();
rte.setMaxHeight(“400px”);
rte.setMinHeight(“200px”);

String valueAsHtml = “

Dear user_name,

 

This is to invite you to an opening event: event_name that will take place at: gate_id on: event_start_day to event_end_day.

 

Please use the link below to check-in/out the event:

Check-in Here

Please contact company_email if you need futher support.

 

Yours Faithfully,

company_name

 

This email is sent by www.iattendance.co on behalf company_name. Please do not reply.

”;

rte.setValue(valueAsHtml);
add(rte);`

Then get error in browser:
Invalid value set to rich-text-editor: SyntaxError: Unexpected token '<', "<p>Dear <s"... is not valid JSON

@quick-witted-echidna FYI

doesn’t method setValue support in vaadin 23 ?

you are using the wrong docs version, the usage is different in v23.

oh, sorry. method: asHtml.setValue() :joy: