editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

addRange(): The given range isn't in document.

Open 4e576rt8uh9ij9okp opened this issue 2 years ago • 5 comments

Describe a bug.

Steps to reproduce:

const editor = new EditorJS({
    holder: "editor",
    onReady: () => {
        editor.blocks.renderFromHTML("<h1>Hello there xD</h1>")
    },
    autofocus: true
})

Expected behavior: It shows the rendered TEXT fine, so not sure, it just shows this error.

Device, Browser, OS: Brave@latest

Editor.js version: 2.26.5

Plugins you use with their versions: none

4e576rt8uh9ij9okp avatar Feb 20 '23 02:02 4e576rt8uh9ij9okp

Hello Did you fix it ?

Abacaxi-Nelson avatar May 25 '23 16:05 Abacaxi-Nelson

I'm getting the same error, definitely stemming from renderFromHTML() - once again, the content renders well but I'm not loving the console error. My code:

const editor = new EditorJS({
  ...
    data: {
      time: props.blockContent?.time || 0,
      blocks: props.dataIsHtml ? undefined : props.blockContent?.blocks,
    },
    onReady: async () => {
      if (props.dataIsHtml) {
        await editor.blocks.renderFromHTML(htmlContent.value);
      }
    },
  ...
}

LeviticusMaximus avatar Jul 21 '23 08:07 LeviticusMaximus

Same issue.

botstar-tra avatar Nov 30 '23 15:11 botstar-tra

I am also rendering from html and having this warning

dawidfreelancer avatar Feb 22 '24 13:02 dawidfreelancer