Skip to main content

Editor Steps

Steps in the Editor category.

Available Steps

CLEAR_SELECTION

Clears the current text selection and optionally repositions the cursor to the start or end of the selection. Available in Swing editor context only.

Version: 1.0.7

Example:


- step: CLEAR_SELECTION
cursorPosition: "anchorEnd"


CLEAR_TAGS

Removes all occurrences of the specified tags from the document or report while preserving their text content. This is useful for cleaning up temporary markup or removing specific tag types.

Version: 1.2.0

Example:


- step: CLEAR_TAGS
tags: ["mark", "highlight"]


CLOSE_DOCUMENT

Closes the current document without saving.

Version: 1.2.0

Example:


- step: CLOSE_DOCUMENT


GET_PURE_TEXT

Retrieves the full pure text content from the current document and sets it as output.

Version: 1.2.0

Example:


- step: GET_PURE_TEXT


GET_TEXT_CONTENT

Retrieves text content from the document or a specific location and sets it as output.

Aliases: CTX_GET_TEXT_CONTENT

Version: 1.0.1

Example:


- step: GET_TEXT_CONTENT


GET_XML_CONTENT

Retrieves XML content from the document or a specific location and sets it as output.

Aliases: CTX_GET_XML_CONTENT

Version: 1.0.1

Example:


- step: GET_XML_CONTENT


GET_ZONES

Retrieves zones and their linked documents from a DWP or Report.

Version: 1.0.0

Example:


- step: GET_ZONES


INSERT_LIST

Insert a list of items into the document. The items can be provided as a list input or be generated from a text input (converted to a list using ProcessToList).

Aliases: CTX_INSERT_LIST

Version: 1.0.0

Example:


- step: SET
text: "Item 1\\nItem 2\\nItem 3"

- step: INSERT_LIST
containerElement: "ol"
listItemElement: "li"


INSERT_OBJECT

Insert object references or templates into the current document using a DTX template.

Prime: Supports paths, UUIDs, and LOIDs (auto-formatted). Options insertionType, full, and templateType are ignored (warnings logged).

Version: 1.2.0

Example:


- step: INSERT_OBJECT
path: "/content/picture/chart.png"


INSERT_TEXT

Insert text at the given location (cursor, xpath or report). If the step reads text from the flowContext, you can use a preceding SET step to provide the content.

Aliases: CTX_INSERT_TEXT

Version: 1.0.0

Example:


- step: SET
text: "This text will be inserted"
- step: INSERT_TEXT
at: CURSOR


INSERT_XML

Insert XML content at the given location. The content can be provided via the flowContext (using in) or via the default text input.

Aliases: CTX_INSERT_XML

Version: 1.0.0

Example:


- step: SET
text: "<p>Inserted paragraph</p>"

- step: INSERT_XML


REPLACE_TEXT

Replace existing text at the given location (cursor paragraph, cursor or xpath) with the provided content. Content can come from a flow variable (using in) or the default text input.

Aliases: CTX_REPLACE_TEXT

Version: 1.0.0

Example:


- step: SET
text: "Replacement text"

- step: REPLACE_TEXT
at: CURSOR_PARAGRAPH


REPLACE_XML

Replace XML content at the given location. Content can be sourced from a flow variable (in) or the default text input.

Aliases: CTX_REPLACE_XML

Version: 1.0.0

Example:


- step: SET
text: "<section>Updated</section>"

- step: REPLACE_XML
at: XPATH
xpath: "/doc/story/grouphead/headline/p"


SAVE_DOCUMENT

Saves the current document. Optionally closes the document after saving.

Version: 1.2.0

Example:


- step: SAVE_DOCUMENT


SELECTED_OBJECT

Retrieves information about the currently selected content object and sets it as output.

Aliases: CTX_SELECTED_OBJECT

Version: 1.0.4

Example:


- step: SELECTED_OBJECT


SET_METADATA

Set a field value in the object panel using a selector or XPath. Supports tagsinput and plain fields.

Aliases: CTX_SET_METADATA

Version: 1.0.0

Example:


- step: SET
text: "The value"
- step: SET_METADATA
selector: "#metadata-title"


TAG_PURE_TEXT

Adds tags to pure text content in the document. Tags can highlight or annotate specific text ranges. In Swing, tags can be virtual (temporary) or persistent. In Prime, tags are always persistent.

Version: 1.2.0

Example:


- step: TAG_PURE_TEXT
tags:
- tag: "mark"
start: 100
size: 10