Skip to content

How to detect onChange callback? #54

@zobweyt

Description

@zobweyt

I need to use onChange event to detect changes in form and enable submit button. I tried to create an instance of editorjs in my script file, but the callback did not work:

new EditorJS({
    holderId: 'id_body_editorjs_holder',
    onChange: (api, event) => {
      console.log('changed');
    },
});

But if I create an editor from scratch without the Django plugin, then I can track this event:

<div id="editorjs"/>
<script type="module">
  new EditorJS({
    onChange: (api, event) => {
      console.log('changed');
    },
  });
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions