<command name = NMTOKEN > Content: class | menu | macro | process </command> <class> Content: Java class name </class>
Register command specified by class
, macro
or process
with XXE. The newly registered command can be referenced in binding command
or menu
, menu item
, toolBar item
and command macro
using name name
.
Example:
<command name="xhtml.preview"> <class>com.xmlmind.xmleditext.xhtml.Preview</class> </command>
In the above example, custom command com.xmlmind.xmleditext.xhtml.Preview
written in Java™ is registered by XXE under the name xhtml.preview
.
All commands are registered in the same global registry using name name
. Therefore, it is strongly recommended to use a prefix (not related to XML namespace prefixes) for the name of your commands. Example of commands written by XMLmind: docb.promote
,
. (We always use docb.demote
, xhtml.previewshort_lower_case_prefix
.camelCaseCommandName
.)
The command
configuration element does not allow to replace intrinsic commands such as insert
or paste
. However, it is possible to replace such intrinsic commands in an .xxe_gui
file. See Section 2, “command” in XMLmind XML Editor - Customizing the User Interface.
Child elements of command
:
Register command implemented in the Java™ language by class class
(implements interface com.xmlmind.xmledit.gadget.Command
-- See Chapter 6, Writing a command in XMLmind XML Editor - Developer's Guide).
Define a popup menu of commands. This special type of command, typically invoked from contextual macro-commands, is intended to be used to specify contextual popup menus, redefining or extending the standard right-click popup menu. See Chapter 3, Menu commands in XMLmind XML Editor - Commands.
Define a macro-command which is, to make it simple, a sequence of native commands, menu commands, process commands or other macro-commands. See Chapter 4, Macro commands in XMLmind XML Editor - Commands.
Define a process command, which is an arbitrarily complex transformation of part or all of the document being edited. See Chapter 5, Process commands in XMLmind XML Editor - Commands.