• I’m in the weeds of using the blocks API. The following bit of code is giving me issues.

    const newBlock = createBlock(JSON.parse(target.getAttribute(“data-block”)).name);
    console.log(newBlock)
    insertBlock(newBlock);

    New block returns what looks like a valid block but insertBlock returns this error.

    editor.js:148 Uncaught TypeError: Object(…) is not a function

    I’ve tried using both insertBlock and InsertBlock with an array wrapper.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘insertBlock Throws Error’ is closed to new replies.