EditorCommandExecutor
public class EditorCommandExecutor
EditorCommandExecutor
manages all the EditorView
in the main EditorView
. Sub editors may have been added as Attachment
in the EditorView
.
All the EditorView
s in the hierarchy sharing the same EditorContext
will automatically be handled by the EditorCommandExecutor
.
EditorCommandExecutor
keeps the track of the EditorView
that has the focus and executes the given command in the active EditorView
.
-
Undocumented
Declaration
Swift
public weak var delegate: EditorCommandExecutorDelegate?
-
Initializes the
EditorCommandExecutor
Declaration
Swift
public init(context: EditorViewContext = EditorViewContext.shared)
Parameters
context
The context for the command executor.
EditorCommandExecutor
is capable of executing commands only on theEditorView
s which are created using the samecontext
. Default value isEditorViewContext.shared
-
Executes the given command on the active
EditorView
having the sameContext
as the Command Executor.EditorCommand
will be executed only if theEditorCommand.canExecute()
returnstrue
for the activeEditorView
.Declaration
Swift
public func execute(_ command: EditorCommand)
Parameters
command
Command to execute