24.08.2015 Views

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

insertPositionOne of the three constants: "Inside", "After", or "Before" , showing where the insertion is maderelative to the reference node selected by the insertLocation. "Inside" has the meaning ofthe first child of the reference node.The arguments of SurroundWithFragmentOperationThe <strong>Author</strong> operation SurroundWithFragmentOperation has only one argument:• fragment -The <strong>XML</strong> fragment that will surround the selection. For example let's consider the fragment:and the document:Considering the selected content to be surrounded is the sequence of elements X and Y, then the result is:Because the element A was the first leaf in the fragment, it received the selected content. The fragment was theninserted in the place of the selection.How to Add a Custom Action to an Existing Document TypeThis task explains how to add a custom <strong>Author</strong> operation to an existing document type.1. Download the <strong>Author</strong> SDK toolkit:http://www.oxygenxml.com/developer.html#<strong>XML</strong>_Editor_<strong>Author</strong>ing_SDK2. Create a Java project with a custom implementation of ro.sync.ecss.extensions.api.<strong>Author</strong>Operation which performsyour custom operation and updates the <strong>Author</strong> mode using our API like:<strong>Author</strong>Access.getDocumentController().insert<strong>XML</strong>Fragment.3. Pack the operation class inside a Java jar library.4. Copy the jar library to the OXYGEN_INSTALL_DIR/frameworks/framework_dir directory.5. Go to <strong>Oxygen</strong> Preferences > Document Type Association page and edit the document type (you need write accessto the OXYGEN_INSTALLATION_DIR).a) In the Classpath tab, add a new entry like: ${frameworks}/docbook/customAction.jar.b) In the <strong>Author</strong> tab, add a new action which uses your custom operation.c) Mount the action to the toolbars or menus.<strong>Author</strong> Developer Guide | 180

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!