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 EditorViews 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
EditorCommandExecutorDeclaration
Swift
public init(context: EditorViewContext = EditorViewContext.shared)Parameters
contextThe context for the command executor.
EditorCommandExecutoris capable of executing commands only on theEditorViews which are created using the samecontext. Default value isEditorViewContext.shared -
Executes the given command on the active
EditorViewhaving the sameContextas the Command Executor.EditorCommandwill be executed only if theEditorCommand.canExecute()returnstruefor the activeEditorView.Declaration
Swift
public func execute(_ command: EditorCommand)Parameters
commandCommand to execute
View on GitHub
EditorCommandExecutor Class Reference