vendure icon indicating copy to clipboard operation
vendure copied to clipboard

Default value in RichTextEditor

Open phuoymakara opened this issue 1 year ago • 1 comments

Describe the bug Hello all, I need help I can not set the default value in RichTextEditor in the React Component.

To Reproduce Steps to reproduce the behavior: <RichTextEditor name="content" readOnly={false} defaultValue={<p>hello</p>} />

phuoymakara avatar Jun 10 '24 23:06 phuoymakara

I managed to implement support for defaultValue, but there is still a bug whereby after the first keypress in the editor, the component seems to un-mount and re-mount again, resetting the content to empty.

Due to my lack of in-depth understanding of React, I'm finding this hard to solve. For some reason, the useEffect clean-up is being called after the first key press.

@AleksanderBondar maybe you have time to take a look?

michaelbromley avatar Jun 24 '24 09:06 michaelbromley

Closed automatically because there has been no activity for 3 days after a reminder. Please comment with new information and remove the stale label to re-open.

github-actions[bot] avatar Jun 25 '25 02:06 github-actions[bot]