toast-ui.react-editor
toast-ui.react-editor copied to clipboard
OnChange does not provide data
onChange callback on Editor
only provides options of editor instead of data.
I missed the same problem with you. Did you have any method to slove it?
don't remember exactly now, but there was some method on this API object to get current value, which is not perfect React solution to the problem.
Hi, this is the answer
const content = this.editorRef.current.getInstance().getValue();
when you initialize you need to pass in a ref
i.e. <Editor ref={this.editorRef} previewStyle="none" ...
Hi, this is the answer
const content = this.editorRef.current.getInstance().getValue();
when you initialize you need to pass in a ref
i.e. <Editor ref={this.editorRef} previewStyle="none" ...
Hi, this is the answer
const content = this.editorRef.current.getInstance().getValue();
when you initialize you need to pass in a ref
i.e. <Editor ref={this.editorRef} previewStyle="none" ...
it's good, thanks
it looks like a workaround not a solution