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

component:remove action #748

Closed
austinbiggs opened this issue Jan 11, 2018 · 3 comments
Closed

component:remove action #748

austinbiggs opened this issue Jan 11, 2018 · 3 comments
Labels

Comments

@austinbiggs
Copy link

austinbiggs commented Jan 11, 2018

Going through the available events, I'm curious as to why there is no "component:remove" action?

I've taken the approach of triggering the action by modifying the tlb-delete action. I would assume there's a better way, I'm just not sure what that would be quite yet.

      defaultCommands['tlb-delete'] = {
        run: function run(ed) {
          var sel = ed.getSelected();

          if (!sel || !sel.get('removable')) {
            console.warn('The element is not removable');
            return;
          }

          ed.select(null);
          sel.destroy();
          
          em && em.trigger('component:remove', null);
        }
      };

@ryandeba
Copy link
Contributor

I would also be interested in having a component:remove event 👍

@artf
Copy link
Member

artf commented Jan 13, 2018

Added for the next release

@artf artf closed this as completed in 013356b Jan 14, 2018
@lock
Copy link

lock bot commented Sep 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the outdated label Sep 18, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants