CommandCollection (core)
@ckeditor/ckeditor5-core/src/commandcollection
class
Collection of commands. Its instance is available in editor.commands
.
Filtering
Properties
-
Command map.
Methods
-
constructor()
module:core/commandcollection~CommandCollection#constructor
Creates collection instance.
-
Symbol.iterator() → Iterable.<Array>
module:core/commandcollection~CommandCollection#Symbol.iterator
Iterable interface.
Returns
[ commandName, commandInstance ]
pairs.Returns
Iterable.<Array>
-
add( commandName, command )
module:core/commandcollection~CommandCollection#add
-
-
destroy()
module:core/commandcollection~CommandCollection#destroy
Destroys all collection commands.
-
execute( commandName, [ ...commandParams ] ) → *
module:core/commandcollection~CommandCollection#execute
Executes a command.
Parameters
commandName : String
The name of the command.
[ ...commandParams ] : *
Command parameters.
Returns
*
The value returned by the
command.execute()
.
-
Retrieves a command from the collection.
Parameters
commandName : String
The name of the command.
Returns
-
names() → Iterable.<String>
module:core/commandcollection~CommandCollection#names
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.