Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dannyb opened this issue Nov 17, 2016 · 0 comments
Open

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

dannyb opened this issue Nov 17, 2016 · 0 comments

Comments

@dannyb
Copy link

dannyb commented Nov 17, 2016

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();
      });
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant