Solo en Mozilla Firefox cuando ingreso texto en muiRichTextEditor con estilo de fuente, por ejemplo, texto en negrita agregado después cuando ingreso texto muestra error DOMException: Node.removeChild: El nodo que se eliminará no es un elemento secundario de este nodo o cuando intento cambiar el estilo de fuente obtuve este error Error no detectado: Obtuve un nulo inesperado o indefinido. Intento todas las soluciones en Github. no funcionan;
const defaultContent = convertToRaw(EditorState.createEmpty().getCurrentContent()); const [content, setContent] = useState(JSON.stringify(defaultContent)); const onChange = (state: EditorState) => { const currentContentState = state.getCurrentContent(); const selectionState = state.getSelection(); EditorState.push(state, Modifier.replaceText(currentContentState, selectionState, ''), 'remove-range'); if (ref && ref.current && isReply) { ref.current.focus(); } setIsEmpty(!state.getCurrentContent().hasText()); }; useEffect(() => { const comment = commentAction.comment; const contentState = convertFromHTML(comment ? comment.text : ''); const state = contentState && ContentState.createFromBlockArray(contentState.contentBlocks, contentState.entityMap); setContent(JSON.stringify(convertToRaw(state))); }, [commentAction.action, commentAction.comment]);