Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

261
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!