Issue #2054Opened May 31, 2019by zhangyanwei0 reactions

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

Question

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)
  }
})

Answers (0)

No answers yet.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.