Skip to content

on-change event not fired after running editor.run #119

@dannyb

Description

@dannyb

Im attempting to do a search and replace. Replacing the text in a range with a link.

I have it creating the link properly and that all seems to be working. However the on-change callback is not being fired. I added postEditor.scheduleDidUpdate(); but that didn't change it.

I attempted to walk through the code and it seemed to be calling the isDirty call backs, but my ember call back (passed as on-change) was not called.

    if (range) {
      editor.run(postEditor => {
        let position = postEditor.deleteRange(range);
        let link = postEditor.builder.createMarkup('a', {href: linkURL});
        postEditor.insertTextWithMarkup(position, linkName, [link]);
        postEditor.scheduleDidUpdate();
      });
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions