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

blocks.render doesn't trigger "onChange"

Open thecliffparis opened this issue 1 year ago • 0 comments

render updates well the editor content but never triggers onChange() against the editor.

Steps to reproduce:

  1. new editorJs with onChange() param
editor = new EditorJS({
            placeholder: 'Start writing...',
            autofocus: true,
            holder: 'my-editor',
            tools: customTools, 
            onChange: () => {
                console.log('Content has been modified');
            }
});
  1. update content with editor.blocks.render(jsonObject)

Expected behavior: triggers onChange console log with "content has been modified"

Device, Browser, OS: Chrome

Editor.js version: latest

Plugins you use with their versions:

thecliffparis avatar Nov 19 '24 00:11 thecliffparis