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

[BUG]: Two command names (new and old) cause the command division. #2054

Closed
zhangyanwei opened this issue May 31, 2019 · 0 comments
Closed

Comments

@zhangyanwei
Copy link

For some predefined commands, has a new name and old name. It tells the user to use the new one as preferred.
If choosing the new command name to extend, will not works, that because of old names in the internal.

The reason is: In commands/index.js, the added or extended commands are the newly created views (extends from CommandAbstract).

Here is my code snippet, it not works if the defaultCommand option value is select-comp

const Command = editor.Commands.get('core:component-select')
editor.Commands.extend('core:component-select', {
  // Overwrite this private method to make the toolbar conditionally display.
  updateToolbar(mod) {
    ...
    Command.updateToolbar.call(this, mod)
  }
})
@artf artf added the bug label Jun 2, 2019
@artf artf added this to To do in Release v0.14.62 via automation Jun 2, 2019
@artf artf closed this as completed in 110c499 Jun 3, 2019
Release v0.14.62 automation moved this from To do to Done Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

2 participants