Closed Shujito closed 7 years ago
it seems that all of what you recorded happened on an emulator, did you test with a device?
I didn't
Later I used the placeholder, that fixed it, the focus doesn't disappear anymore
hi, can you share the code of how you use the placeholder? because i use the HTML it doesn't show any title or content and toolbar actions also does not work. Please advice. Thank you
just add the contentPlaceholder
prop to the editor component
like this:
/* ... */
render() {
return (
<RichTextEditor
contentPlaceholder={'your placeholder is here'}
...otherProps
/>
);
}
/* ... */
no need to action or something like this:
async getHTML() {
const titleHtml = await this.richtext.getTitleHtml();
const contentHtml = await this.richtext.getContentHtml();
alert(titleHtml + ' ' + contentHtml)
}
because I tried your method also does't show any text in the editor...
If there's only one item and it gets deleted, the cursor disappears and can't be focused again if you touch the editor
I recorded it so you can understand better what is happening
I noticed that, you can still edit if you don't touch the editor. If you add a new line and delete it, the cursor comes back and you can touch the editor without losing the focus
I also recorded when that happens
Maybe there's a way to disable touch or focus?