Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

271
Visualizações
draft-js Uncaught Error: Got unexpected null or undefined when change font style

Only in Mozilla Firefox when i input text in muiRichTextEditor with font style for example bold text added after when i input text show error DOMException: Node.removeChild: The node to be removed is not a child of this node or when i try change font style got this error Uncaught Error: Got unexpected null or undefined. I try all solutions in Github. they doesn't work;

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]);
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda