, как следует из приведенного ниже, вы можете запускать свои действия сохранения при изменении редактора или событии размытия (но для производительности я рекомендую размытие):
const [editorState, setEditorState] = useState();
const [editable, setEditable]=useState(false);
const editorRef = useRef(null);
const onChange = (editorState) => {
setEditorState(editorState);
};
const onBlur = (state) => {
// convertToRaw from draft-js;
const contentState = convertToRaw(editorState.getCurrentContent());
// save contentState
};
return (
<Editor
editorState={editorState}
readOnly={!editable}
onChange={onChange}
onBlur={onBlur}
ref={editorRef}
autoCapitalize="none"
autoComplete="off"
autoCorrect="off"
spellCheck={false}
/>
)