Documentation Center

Command.execute

Description

Execute the command.

myCounterCommand.execute = function (scope) {
  var i = scope.get("counter");
  Editor.getActiveDocument().getDocumentElement().setAttribute("count", i);
  scope.set("counter", i++);
}

Syntax

Command .execute (scope : Scope)

Arguments

scope
Scope . The scope state.