Open bamaarintoko opened 5 years ago
@jimreynolds67 that not work bro, i have tried
Here's what worked for me... if I understands what your looking for Im using it to listen for a character '@' in order to trigger a mentions function.
onEditorInitialized = () => { this.setFocusHandlers(); this.getHTML(); };
async getHTML() { this.richtext.registerContentChangeListener(str => { this.setState({ commentText: str }) this.onChangeText(str); }); }
render() { ... <RichTextEditor ref={r => (this.richtext = r)} style={{ alignItems: "center", justifyContent: "center", backgroundColor: "transparent", width: (width / 100) 80, height: (height / 100) 24, }} contentPlaceholder="+ Add a Comment" hiddenTitle={true} enableOnChange={true} initialContentHTML="" editorInitializedCallback={() => this.onEditorInitialized()} /> ... }
how to detect onValueChanged?