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

Destroy editor when scope is destroyed #39

Open
benfoster opened this issue Mar 30, 2015 · 2 comments
Open

Destroy editor when scope is destroyed #39

benfoster opened this issue Mar 30, 2015 · 2 comments

Comments

@benfoster
Copy link

Currently the editor is not destroyed when the directive scope is destroyed. This is a problem for us as when switching between editors in our application, redactor just get's re-inited/rendered each time it is selected. Fix:

        scope.$on('$destroy', function () {
          if (angular.isDefined(editor)) {
            $_element.redactor('core.destroy');
          }
        });
@TylerGarlick
Copy link
Owner

Can you do a pull request for that?

@JeromeLam
Copy link

@TylerGarlick PR #37 does exactly that, although coded differently.

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

3 participants