RealObjects Nimbudocs Editor 2.5.3885_Beta5

Guide: Action Reference


Introduction

Most of the functionality of Nimbudocs Editor can be customized via the use of actions. These actions can be used as a part of the toolbar, context menu or menu bar such as is the case in the default user interface configuration file delivered with Nimbudocs Editor. Note however, that this file does not contain all actions, and the number of available actions far exceeds the ones used in the editor's default configuration.

In addition to being used in the editor's user interface configuration, actions can also be invoked programmatically using JavaScript methods. Moreover, the integrator can define custom JavaScript actions and use those in the editor's user interface or invoke them programmatically if required.

There are some predefined shortcuts which can be used to invoke actions using your keyboard.

Handling Actions

For just invoking actions, you can use the API method invokeAction. You can also optionally pass a parameter.

editor.invokeAction("bold");
editor.invokeAction("align", "center");

If you want to have access to all the functionality of an action, use the API method getAction which returns an Action object. To add custom code to the action, you can add a listener using the addInvokeListener method. The listeners are notified when the action is invoked.

It is also possible to prevent the action to execute its default functionality. To do this, you can call the preventDefault method on the event which is passed to the invocation listeners.

The following examples shows how to modify and override the default functionality of the "bold" and "insert-date" actions.

editor.addEventListener("bold", "actioninvoke", function(e) {
    // add custom code
    editor.fetchCurrentElement().then(function(element) {
        console.log("boldifying element: " + element);
    });
});

editor.addEventListener("insert-date", "actioninvoke", function(e) {
    // custom code
    var monthNames = new Array("January", "February", "March", 
                               "April", "May", "June", 
                               "July", "August", "September", 
                               "October", "November", "December");
    var date = new Date();
    var day = date.getDate();
    var month = date.getMonth();
    var year = date.getFullYear();
    editor.insertContent(monthNames[month] + " " + day + ", " + year);
    
    // override default functionality
    e.preventDefault();
});

Action States

An action has three possible states:

You can set these states in client-side stateless actions, which is e.g. useful when you have radio-button-like action groups.

editor.addEventListener("my-action1", "actioninvoke", function(e) {
    this.selectedState = true;
    
    editor.getAction("my-action-2").selectedState = false;
    editor.getAction("my-action-3").selectedState = false;
    
    // custom code...
});

editor.addEventListener("my-action2", "actioninvoke", function(e) {
    this.selectedState = true;
    
    editor.getAction("my-action-1").selectedState = false;
    editor.getAction("my-action-3").selectedState = false;
    
    // custom code...
});

editor.addEventListener("my-action3", "actioninvoke", function(e) {
    this.selectedState = true;
    
    editor.getAction("my-action-1").selectedState = false;
    editor.getAction("my-action-2").selectedState = false;
    
    // custom code...
});

You can also add listeners to the action states which will be notified when the respective state changes.

var boldAction = editor.getAction("bold");

boldAction.addEventListener(Action.prototype.PROPERTY_SELECTED_STATE, function() {
    if (boldAction.selectedState === true) {
        console.log("this text is bold");
    } else if (boldAction.selectedState === false) {
        console.log("this text is not bold");
    }
});

Reference

accept-all-changes

Accepts all changes in the document.

accept-change

Accepts the current change in the document.

accept-change-gonext

Accepts the current change and moves to the next change in the document.

align

Sets the alignment of the paragraph at the caret position.

This action needs an action command if it is invoked via invokeAction. Possible action commands are: left, center, right.

Invoking the align action with an action command
editor.invokeAction("align","center");
align-center

Aligns the paragraph at the caret position at the center.

align-default

Removes the alignment of the paragraph at the caret position.

align-justify

Justifies the paragraph at the caret position.

align-left

Aligns the paragraph at the caret position on the left.

align-right

Aligns the paragraph at the caret position on the right.

auto-correct-dialog

Opens the "Auto Correct Properties" dialog.

auto-fit-table-content

Removes width and height of the table elements.

background-color

Sets the background color at the caret position or of the current selection. This action needs an action command if it is invoked via invokeAction. Possible values are XHTML color codes.

Invoking the background-color action with an action command
editor.invokeAction("background-color", "#C8C8C8");
background-color-aqua

Sets background color to aqua.

background-color-black

Sets background color to black.

background-color-blue

Sets background color to blue.

background-color-default

Removes the background color at the caret position or of the current selection.

background-color-fuchsia

Sets background color to fuchsia.

background-color-gray

Sets background color to gray.

background-color-green

Sets background color to green.

background-color-lime

Sets background color to lime.

background-color-maroon

Sets background color to maroon.

background-color-navy

Sets background color to navy.

background-color-olive

Sets background color to olive.

background-color-orange

Sets background color to orange.

background-color-purple

Sets background color to purple.

background-color-red

Sets background color to red.

background-color-silver

Sets background color to silver.

background-color-teal

Sets background color to teal.

background-color-white

Sets background color to white.

background-color-yellow

Sets background color to yellow.

backgroundcolor-dialog

Opens the "Background Color" dialog.

barcode-properties

Changes the properties of a barcode or QR code. This action needs an action command if it is invoked via invokeAction. The command value must be a JSON object with the keys "type" and "content". Both are mandatory, "type" can be one of the following string values: "qrcode", "pdf417", "datamatrix", "ean-8", "ean-13", "ean-128", "itf-14", "upc-a", "upc-e", "code39", "code128", "codabar", "interleaved2of5", "postnet", "royal-mail-cbc", "usps4cb"."

barcode-properties-dialog

Opens the "Barcode Properties" dialog.

block-indent

Removes the block indentation.

bold

Sets font weight bold at the caret position or of the current selection and enables typing of bold text.

bookmark-properties-dialog

Opens the "Bookmark Properties..." dialog.

cell-properties

Sets the properties of the cell at the caret position. This action needs an action command if it is invoked via invokeAction. Possible values are JSON objects with the keys "width", "widthUnit", "height", "heightUnit", "align" and "valign".

Invoking the cell-properties action with an action command
attributes = {};
attributes.height = "80";
attributes.heightUnit = "%";
attributes.width = "200";
attributes.widthUnit = "%";
attributes.align = "left";
attributes.valign = "top";
editor.invokeAction("cell-properties", attributes);
cell-properties-dialog

Opens the "Cell Properties" dialog.

change-bookmark

Changes the name of the bookmark at the caret position. This action needs an action command if it is invoked via invokeAction. The action command determines the new name of the bookmark.

Invoking the change-bookmark action with an action command
editor.invokeAction("change-bookmark", "Introduction");
change-case

Changes the case of the word at the caret position or of the words in the current selection. This action needs an action command if it is invoked via invokeAction. Possible values are "[lowercase]", "[UPPERCASE]", "[Title Case]", "[tOGGLE cASE]" and "[Sentence case]".

Invoking the change-case action with an action command
editor.invokeAction("change-case", "[Title Case]");
change-case-dialog

Opens the "Change Case" dialog.

change-language-dialog

Opens the "Change Language" dialog.

clear-formatting

Removes all formatting from the selection or at the caret position if there is no selection.

color

Sets the font color at the caret position or of the current selection. This action needs an action command if it is invoked via invokeAction. Possible values are XHTML color codes.

Invoking the color action with an action command
editor.invokeAction("color", "#C8C8C8");
color-aqua

Sets font color to aqua.

color-black

Sets font color to black.

color-blue

Sets font color to blue.

color-default

Removes the font color at the caret position or of the current selection.

color-dialog

Opens the "Font Color" dialog.

color-fuchsia

Sets font color to fuchsia.

color-gray

Sets font color to gray.

color-green

Sets font color to green.

color-lime

Sets font color to lime.

color-maroon

Sets font color to maroon.

color-navy

Sets font color to navy.

color-olive

Sets font color to olive.

color-orange

Sets font color to orange.

color-purple

Sets font color to purple.

color-red

Sets font color to red.

color-silver

Sets font color to silver.

color-teal

Sets font color to teal.

color-white

Sets font color to white.

color-yellow

Sets font color to yellow.

column-properties

Sets the properties of all cells of the column at the caret position. This action needs an action command if it is invoked via invokeAction. Possible values are JSON objects with the keys "width", "widthUnit", "height", "heightUnit", "align" and "valign".

Invoking the column-properties action with an action command
attributes = {};
attributes.width = "200";
attributes.widthUnit = "%";
attributes.valign = "top";
editor.invokeAction("column-properties", attributes);
column-properties-dialog

Opens the "Column Properties" dialog.

compare-documents-dialog

Opens the "Compare Documents" dialog which allows the user to select two documents for comparison.

Once the documents are loaded, the editor runs in comparison mode.

convert-image-to-data-uri

Triggers the conversion to base64 data URIs of all images in the document for which the CSS property "-ro-nimbu-image-src" with the value "convert" is applied either by inline style or an external style sheet (e.g. by using a class).

If the "-ro-nimbu-image-src" property is not set, or if the value is "auto" or "keep", the corresponding image is not converted.

convert-table

Tables with an absolute size are converted to tables with relative width.

copy-format

Copies the formatting information of the current selection.

create-pdf-dialog

Opens the create PDF dialog.

decrease-block-indent

Decreases the indentation of the block at the caret position or of the current selection.

decrease-font-size

Decreases the font size at the caret position or of the current selection.

decrease-indent

Decreases the indentation of the element at the caret position or of the current selection.

decrease-list-indent

Decreases the indentation of the list at the caret position or of the current selection.

decrease-list-level

Decreases the list level at the caret position or of the current selection.

decrease-multi-column-count

Decreases the column count

decrease-page-index

Moves the caret to the beginning of the previous page displayed in the editor.

decrease-zoom-client

Decreases the zoom level.

default-key-typed

Insert a character into the document at the caret position as if the character was typed with a keyboard.

delete-backward

Emulates pressing Backspace.

delete-block

Deletes the block at the caret position.

delete-column

Deletes the table column at the caret position.

delete-container

Deletes the container at the caret position.

delete-forward

Emulates pressing Delete.

delete-next-character

Deletes the next inline element of the caret position or the current selection.

delete-next-paragraph-break

Deletes the next paragraph break.

delete-next-word

Deletes the next word after the caret position. If the caret is inside a word, the right part of the word is deleted instead.

delete-previous-character

Deletes the previous inline element of the caret position or the current selection.

delete-previous-paragraph-break

Deletes the previous paragraph break.

delete-previous-word

Deletes the previous word before the caret position. If the caret is inside a word, the left part of the word is deleted instead.

delete-row

Deletes the table row at the cursor position.

delete-selection

Deletes the current selection.

delete-tab

Deletes the tab at the caret position.

delete-table

Deletes the table at the caret position.

delete-table-caption

Deletes the table caption at the caret position.

disable-list-level

Deletes the list level at the caret position.

draw-shape-freehand

Draws a freehand shape. You can optionally pass default properties to the action.

Invoking the draw-shape-freehand action with an action command
var properties = {
    lineWidth: "10",
    lineColor: "green"
};

editor.invokeAction("draw-shape-freehand", properties);
edit-annotation-dialog

Opens the "Edit Annotation" dialog.

end-comparison-dialog

Opens the "End Comparison" dialog.

find-next

Finds the next change in the document.

find-previous

Finds the previous change in the document.

find-replace-dialog

Opens the "Find and Replace" dialog.

font-family

Sets the font family of the current selection. This action needs an action command if it is invoked via invokeAction. Possible values are any font family names supported by Java on this system.

Invoking the font-family action with an action command
editor.invokeAction("font-family", "monospace");
font-size

Sets the font size of the current selection. This action needs an action command if it is invoked via invokeAction. Possible values are any CSS font size.

Invoking the font-size action with an action command
editor.invokeAction("font-size", "20px");
font-size-10

Sets font size to 10px.

font-size-11

Sets font size to 11px.

font-size-12

Sets font size to 12px.

font-size-14

Sets font size to 14px.

font-size-16

Sets font size to 16px.

font-size-18

Sets font size to 18px.

font-size-20

Sets font size to 20px.

font-size-22

Sets font size to 22px.

font-size-24

Sets font size to 24px.

font-size-26

Sets font size to 26px.

font-size-28

Sets font size to 28px.

font-size-36

Sets font size to 36px.

font-size-48

Sets font size to 48px.

font-size-72

Sets font size to 72px.

font-size-8

Sets font size to 8px.

font-size-9

Sets font size to 9px.

font-size-default

Removes the font size at the caret position or from the current selection.

format-painter

When the action is enabled (toggled on), the formatting of the current caret position or selection is copied and can be applied to other parts of the document by clicking or selecting text.

goto-next-change

Moves to the next change found in the document.

goto-prev-change

Moves to the previous change found in the document.

hyperlink-properties-dialog

Opens the "Hyperlink Properties" dialog.

image-properties

Sets the properties of the image at the caret position. This action needs an action command if it is invoked via invokeAction. Possible values is a JSON object with the keys "imageAlt", "imageBorderColor", "imageBorderStyle", "imageBorderWidthStyle", "imageBorderWidthUnit", "imageHeight", "imageHeightUnit", "imageRotation", "imageSource", "imageWidth" and "imageWidthUnit".

Invoking the image-properties action with an action command
attributes = {};
attributes.imageHeight = "80";
attributes.imageHeightUnit = "%";
attributes.imageWidth = "200";
attributes.imageWidthUnit = "%";
editor.invokeAction("image-properties", attributes);
image-properties-dialog

Opens the "Image Properties" dialog.

increase-block-indent

Increases the indentation of the block at the caret position or of the current selection.

increase-font-size

Increases the font size at the caret position or of the current selection.

increase-indent

Increases the indentation of the element at the caret position or of the current selection.

increase-list-indent

Increases the indentation of the list at the caret position.

increase-list-level

Increases the list level at the caret position or of the current selection.

increase-multi-column-count

Increases the column count

increase-page-index

Moves the caret to the beginning of the next page displayed in the editor.

increase-zoom-client

Increases the zoom level.

insert-annotation

Inserts an annotation at the caret position. This action needs an action command if it is invoked via invokeAction. The action command passed as argument is inserted as annotation text.

Invoking the edit-annotation action with an action command
editor.invokeAction("insert-annotation", "New annotation value");
insert-annotation-dialog

Opens the "Insert Annotation" dialog.

insert-barcode

Inserts a barcode or QR code. This action needs an action command if it is invoked via invokeAction. The command value must be a JSON object with the keys "type" and "content". The "type" is mandatory and can be one of the following string values: "qrcode", "pdf417", "datamatrix", "ean-8", "ean-13", "ean-128", "itf-14", "upc-a", "upc-e", "code39", "code128", "codabar", "interleaved2of5", "postnet", "royal-mail-cbc", "usps4cb"." If "content" is omitted the current selection plain text is used as content. (Omitting "content" thus requires a selection, without a selection nothing will be inserted).

insert-barcode-dialog

Opens the "Insert Barcode" dialog.

insert-bookmark

Inserts a bookmark at the caret position. This action needs an action command if it is invoked via invokeAction. The action command determines the bookmark name.

Invoking the insert-bookmark action with an action command
editor.invokeAction("insert-bookmark", "Appendix");
insert-bookmark-dialog

Opens the "Insert Bookmark" dialog.

insert-column-after

Inserts a column after the column at the caret position.

insert-column-before

Inserts a column before the column at the caret position.

insert-container

Inserts a container at the caret position.

insert-date

Inserts the date at the caret position.

insert-hyperlink

Inserts a hyperlink at the caret position or at the current selection.

insert-hyperlink-dialog

Opens the "Insert Hyperlink" dialog.

insert-image-dialog

Opens the "Insert Image" dialog.

insert-line-break

Inserts a line-break at the caret position.

insert-list-item-break

Inserts a list-item-break at the caret position.

insert-nbsp

Inserts a   at the caret position.

insert-next-element-template

Inserts template for the next element.

insert-non-breaking-hyphen

Inserts a non-breaking-hyphen

insert-page-break

Inserts a page-break at the caret position.

insert-paragraph-after-block

Inserts a paragraph after the block a the caret position.

insert-paragraph-after-container

Inserts a paragraph after the container at the caret position.

insert-paragraph-after-list

Inserts a paragraph after the list at the caret position.

insert-paragraph-after-table

Inserts a paragraph after the table at the caret position.

insert-paragraph-before-block

Inserts a paragraph before the block at the caret position.

insert-paragraph-before-container

Inserts a paragraph before the container at the caret position.

insert-paragraph-before-list

Inserts a paragraph before the list at the caret position.

insert-paragraph-before-table

Inserts a paragraph before the table at the caret position.

insert-paragraph-break

Inserts a paragraph break at the caret position.

insert-row-after

Inserts a row after the row at the caret position.

insert-row-before

Inserts a row before the row at the caret position.

insert-shape-arrow

Inserts an arrow shape.

insert-shape-box

Inserts a box shape.

insert-shape-circle

Inserts a circle shape.

insert-shape-freehand

Inserts a freehand shape.

insert-shape-line

Inserts a line shape.

insert-soft-hyphen

Inserts a soft hyphen.

insert-special-character-dialog

Opens the "Insert Special Character" dialog (JavaScript dialog).

insert-tab

Inserts a tab at the caret position.

insert-table-caption

Inserts a table caption at the caret position.

insert-table-dialog

Opens the "Insert Table" dialog.

italic

Makes the selection italic and enables typing of italic text.

language

Sets the language of the current selection. This action needs an action command if it is invoked via invokeAction. Possible values are any valid language code combination. Note that the spell checker and thesaurus do not recognize language codes they do not support.

Invoking the language action with an action command
editor.invokeAction("language", "de-DE");
language-american-english

Sets the language of the current selection to American English.

language-american-legal

Sets the language of the current selection to American legal.

language-american-medical

Sets the language of the current selection to American medical.

language-brazilian-portuguese

Sets the language of the current selection to Brazilian Portuguese.

language-british-english

Sets the language of the current selection to British English.

language-british-legal

Sets the language of the current selection to British legal.

language-british-medical

Sets the language of the current selection to British medical.

language-canadian-english

Sets the language of the current selection to Canadian English.

language-danish

Sets the language of the current selection to Danish.

language-default

Sets the language of the current selection to the default value.

language-dutch

Sets the language of the current selection to Dutch.

language-finnish

Sets the language of the current selection to Finnish.

language-french

Sets the language of the current selection to French.

language-german

Sets the language of the current selection to German.

language-italian

Sets the language of the current selection to Italian.

language-none

Removes the language attribute of the current selection.

language-norwegian

Sets the language of the current selection to Norwegian.

language-portuguese

Sets the language of the current selection to Portuguese.

language-spanish

Sets the language of the current selection to Spanish.

language-swedish

Sets the language of the current selection to Swedish.

line-height-100

Sets the line height to 1em.

line-height-125

Sets the line height to 1.25em.

line-height-150

Sets the line height to 1.5em.

line-height-175

Sets the line height to 1.75em.

line-height-200

Sets the line height to 2em.

list

Converts the paragraph at the caret position or the current selection to a list. This action needs an action command if it is invoked via invokeAction. Possible values are ol and ul.

Invoking the list action with an action command
editor.invokeAction("list", "ol");
list-default

Converts a list at the caret position or the current selection to a paragraph.

list-ordered

Converts the paragraph at the caret position or the current selection to an ordered list.

list-unordered

Converts the paragraph at the caret position or the current selection to a unordered list.

live-document-language

Sets the current language of the document. This action needs an action command if it is invoked via invokeAction.

Invoking the live-document-language action with an action command
editor.invokeAction("live-document-language", "en-US");
live-fragment-language

Sets the current language of the document fragment at the caret position or of the current selection. This action needs an action command if it is invoked via invokeAction.

Invoking the live-fragment-language action with an action command
editor.invokeAction("live-fragment-language", "en-US");
load-url-dialog

Opens the "Load URL" dialog.

merge-cells

Merges the selected cells.

merge-container

Merges the selected containers.

merge-table

Merges the selected tables.

move-document-end

Moves the caret to the end of the document.

move-document-start

Moves the caret to the beginning of the document.

move-down

Moves the caret down.

move-left

Moves the caret to the left.

move-line-end

Moves the caret to the end of the line of the caret position.

move-line-start

Moves the caret to the beginning of the line of the caret position.

move-next-block

Moves the caret to the beginning of the next block.

move-next-editable-element

Moves the caret to the beginning of the next element that is editable (not read-only).

move-next-page

Moves the caret to the beginning of the next page.

move-next-table-cell

Moves the caret to the beginning of the next table cell.

move-next-word

Moves the caret to the beginning of the next word.

move-page-down

Moves the caret one view port down.

move-page-end

Moves the caret to the end of the page of the caret position.

move-page-start

Moves the caret to the beginning of the page of the caret position.

move-page-up

Moves the caret one view port up.

move-previous-block

Moves the caret to the beginning of the previous block.

move-previous-editable-element

Moves the caret to the beginning of the previous element that is editable (not read-only).

move-previous-page

Moves the caret to the beginning of the previous page.

move-previous-table-cell

Moves the caret to the beginning of the previous table cell.

move-previous-word

Moves the caret to the beginning of the previous word.

move-right

Moves the caret to the right.

move-to-bookmark

Selects a bookmark. This action needs an action command if it is invoked via invokeAction. The bookmark with the specified name is selected if a bookmark with that name is found in the document.

Invoking the move-to-bookmark action with an action command
editor.invokeAction("move-to-bookmark", "AppendixIndex");
move-to-next-bookmark

Selects the next bookmark found starting from the caret position.

move-to-previous-bookmark

Selects the previous bookmark found starting from the caret position.

move-up

Moves the caret up.

move-word-left

Moves the caret to the beginning of the word left.

move-word-right

Moves the caret to the beginning of the word right.

multi-column-dialog

Opens a dialog to set or edit multi column properties.

multi-column-count

Creates a multi column layout and sets the amount of columns. This action needs an action command if it is invoked via invokeAction.

Invoking the multi-column-count action with an action command
editor.invokeAction("multi-column-count", 3);
multi-column-gap

Sets the gap between columns. This action needs an action command if it is invoked via invokeAction.

Invoking the multi-column-gap action with an action command
editor.invokeAction("multi-column-gap", "0.5cm");
multi-column-width

Sets the width of the columns. This action needs an action command if it is invoked via invokeAction.

Invoking the multi-column-width action with an action command
editor.invokeAction("multi-column-width", "3cm");
multi-column-fill

Sets the fill behavior of the columns. This action needs an action command if it is invoked via invokeAction. Possible values are auto and balanced. The default is balanced.

Invoking the multi-column-fill action with an action command
editor.invokeAction("multi-column-fill", "auto");
multi-column-rule-style

Sets the width of the column rule. This action needs an action command if it is invoked via invokeAction.

Invoking the multi-column-rule-width action with an action command
editor.invokeAction("multi-column-rule-width", "10px");
multi-column-rule-style

Sets the style of the column rule. This action needs an action command if it is invoked via invokeAction.

Invoking the multi-column-rule-style action with an action command
editor.invokeAction("multi-column-rule-style", "dotted");
multi-column-rule-color

Sets the color of the column rule. This action needs an action command if it is invoked via invokeAction.

Invoking the multi-column-rule-color action with an action command
editor.invokeAction("multi-column-rule-color", "#FF0000");
new-document

Clears the editor's content and populates the editor with a template or default document.

page-mode

Sets the display mode of the editor. This action needs an action command if it is invoked via invokeAction. Possible values are "0" and "1". 0 and 1 correspond to continuous mode and single-sided mode.

Invoking the page-mode action with an action command
editor.invokeAction("page-mode", "0");
page-mode-continuous

Sets the display mode of the editor to continuous.

page-mode-single-sided

Sets the display mode of the editor to single-sided.

page-properties-dialog

Opens the "Page Properties..." dialog. (Allows to edit page margins, page size/orientation and header/footer)

paragraph-margin-default

Sets the paragraph margin to the default value.

paragraph-margin-0

Sets the paragraph margin to 0em.

paragraph-margin-50

Sets the paragraph margin to .50em.

paragraph-margin-100

Sets the paragraph margin to 1em.

paragraph-margin-150

Sets the paragraph margin to 1.5em.

paragraph-margin-200

Sets the paragraph margin to 2em.

paragraph-margin-250

Sets the paragraph margin to 2.5em.

paragraph-margin-300

Sets the paragraph margin to 3em.

paste

Inserts the contents of the clipboard in HTML format.

paste-format

Applies the formatting copied with copy-format.

paste-mode-keep-formatting

Selects the "keep-formatting" paste mode. In this paste mode, pasted content will keep all formatting.

paste-mode-match-destination

Selects the "match-destination" paste mode. In this paste mode, the formatting of the pasted content will match the formatting of the current block.

paste-mode-text-only

Selects the "text-only" paste mode. In this paste mode, content is pasted as plain text.

paste-special-dialog

Opens the "Paste Special" dialog.

print-dialog

Opens the "Print" dialog.

redo

The last action that was rolled back is performed.

reject-all-changes

Rejects all changes in the document.

reject-change

Rejects the current change in the document.

reject-change-gonext

Rejects the current change and moves to the next change in the document.

remove-annotation

Removes the annotation at the caret position.

remove-bookmark

Removes the bookmark at the caret position.

remove-hyperlink

Removes the hyperlink at the caret position.

remove-multi-column

Removes multi column layout.

return-key

Inserts a return key a the caret position.

row-properties

Sets the properties of all cells within a table row. This action needs an action command if it is invoked via invokeAction. Possible values are JSON objects with the keys "align", "bgcolor", "height", "heightUnit" and "valign".

Invoking the row-properties action with an action command
attributes = {};
attributes.height = "80";
attributes.heightUnit = "%";
attributes.valign = "top";
editor.invokeAction("row-properties", attributes);
row-properties-dialog

Opens the "Row Properties" dialog.

script-sub

Makes the selection subscript and allows the typing of subscript text.

script-super

Makes the selection superscript and allows the typing of superscript text.

select-all

Selects all content within the editor.

select-block

Selects the block at the caret position.

select-container

Selects the container at the caret position.

select-document-end

Selects from the caret position to the end of the document.

select-document-start

Selects from the caret position to the beginning of the document.

select-down

Selects the content from the caret position to the same horizontal position in the line below.

select-left

Selects the character to the left of the caret position.

select-line

Selects the line at the caret position.

select-line-end

Selects from the caret position to the end of the line of the caret position.

select-line-start

Selects from the caret position to the beginning of the line of the caret position.

select-list

Selects the list at the caret position.

select-list-item

Selects the list item at the caret position.

select-next-block

Selects from the caret position to the end of the next block.

select-next-page

Selects from the caret position to the beginning of the next page. This action has no effect when page-view is continuous.

select-next-word

Selects from the caret position to the end of the word at the caret position.

select-page

Selects the page at the caret position.

select-page-down

Selects from the caret position to the same horizontal position below, creating a selection whose height equals the height of the view port.

select-page-end

Selects from the caret position to the end of the page. This action has no effect when page-view is continuous.

select-page-start

Selects from the caret position to the beginning of the page. This action has no effect when page-view is continuous.

select-page-up

Selects from the caret position to the same horizontal position above, creating a selection whose height equals the height of the view port.

select-positioned-content

If the caret position is in a positioned element, this action selects the positioned element's content.

select-previous-block

Selects from the caret position to the beginning of the previous block.

select-previous-page

Selects from the caret position to the beginning of the previous page. This action has no effect when page-view is continuous.

select-previous-word

Selects from the caret position to the beginning of the word at the caret position.

select-right

Selects the character to the right of the caret position.

select-sentence

Selects the sentence at the caret position or the sentence preceding the caret position if the caret is between two sentences.

select-table

Selects the table at the caret position.

select-table-caption

Selects the table caption of the table at the caret position.

select-table-cell

Selects the table cell at the caret position.

select-table-column

Selects the table column at the caret position or all columns of the selection.

select-table-row

Selects the table row at the caret position or all rows of the selection.

select-up

Selects the content from the caret position up to the same horizontal position in the line above.

select-word

Selects the word at the caret position.

select-word-left

Selects from the caret position to the left word boundary.

select-word-right

Selects from the caret position to the right word boundary.

set-collab-password

Sets the password for the current collaboration session of this editor.

set-collab-password-dialog

Opens the "Set Collab Password" dialog.

shift-tab-key

Emulates pressing shift + tab key.

show-annotations-bubbles

Enables the bubble annotations view.

show-annotations-disabled

Disables the annotations view.

show-annotations-inline

Enables the inline annotations view.

show-bubbles-author

Display the author in bubbles.

show-bubbles-timestamp

Display the creation time in bubbles.

show-changes-final

Shows the final document.

show-changes-final-bubble

Shows the final document. Deletions are shown in bubbles.

show-changes-mixed-inline

Shows insertions and deletions inline. Insertions are underlined, deletions are strike-through.

show-changes-original

Shows the original document.

show-changes-original-bubble

Shows the original document. Insertions are shown in bubbles.

show-collab-url

Shows URL to the current collaboration session of this editor.

split-cell

Splits the cell(s) at the caret position or of the current selection. This action needs an action command if it is invoked via invokeAction. Possible values are arrays with two integer numbers like [2,3]. The first number corresponds to the number of the resulting rows and the second number corresponds to the number of the resulting columns of a cell.

Invoking the split-cell action with an action command
editor.invokeAction("split-cell", [2,3]);
split-cell-dialog

Opens the "Split Cell" dialog, which allows splitting of table cells.

split-container

Splits the container below the caret position or below the current selection.

split-table

Splits the table above the caret position or above the current selection.

strikethrough

Strikes out the text at the caret position or of the current selection and enables typing of striked out text.

switch-focus-area

Switches focus between the editing area and the surrounding Nimbudocs Editor user interface. This allows to navigate the tool bar and other UI elements with the keyboard. By default the shortcut is "Strg shift F" on Windows and "shift alt F" on OS X.

tab-key

Emulates pressing the tab key.

table-cell-valign

Sets the vertical alignment of the table cell at the caret position. This action needs an action command if it is invoked via invokeAction. Possible values are baseline, bottom, default, middle and top.

Invoking the table-cell-valign action with an action command
editor.invokeAction("table-cell-valign", "baseline");
table-cell-valign-baseline

Sets the vertical alignment of the cell content at the caret position or of the selected cell(s) to the baseline.

table-cell-valign-bottom

Sets the vertical alignment of the cell content at the caret position or of the selected cell(s) to the bottom.

table-cell-valign-default

Removes the vertical alignment of the cell content at the caret position or of the selected cell(s).

table-cell-valign-middle

Sets the vertical alignment of the cell content at the caret position or of the selected cell(s) to the middle.

table-cell-valign-top

Sets the vertical alignment of the cell content at the caret position or of the selected cell(s) to the top.

table-properties-dialog

Opens the "Table Properties" dialog.

toggle-accessibility-mode

Toggles the accessibility mode. Enabling accessibility mode allows screen readers to read selected content in the Editor. Note: Works only in specific browser/screen-reader combinations. By default the shortcut is "Strg shift A" on Windows and "shift alt A" on OS X.

toggle-auto-spellcheck

Toggles automatic spell checker.

toggle-collab-mode

Enables or disables the collaboration mode.

toggle-heading-1

Applies the style template Heading 1 at the caret position. This effectively converts the block at the caret position to a title section formatted with <h1>.

toggle-heading-2

Applies the style template Heading 2 at the caret position. This effectively converts the block at the caret position to a title section formatted with <h2>.

toggle-heading-3

Applies the style template Heading 3 at the caret position. This effectively converts the block at the caret position to a title section formatted with <h3>.

toggle-heading-4

Applies the style template Heading 4 at the caret position. This effectively converts the block at the caret position to a title section formatted with <h4>.

toggle-heading-5

Applies the style template Heading 5 at the caret position. This effectively converts the block at the caret position to a title section formatted with <h5>.

toggle-heading-6

Applies the style template Heading 6 at the caret position. This effectively converts the block at the caret position to a title section formatted with <h6>.

toggle-multi-column-span

Toggle the current element (paragraph, heading, etc.) to span across all columns.

toggle-paragraph

Applies the style template Paragraph at the caret position. This effectively converts the block at the caret position to a paragraph. Note this action only has an effect if the setting.

toggle-read-only-view

Enables or disables the highlighting of read-only portions of the document.

toggle-show-container-grid-client

Toggles visualization of containers.

toggle-show-marks-client

Toggles visualization of invisible characters.

toggle-show-table-grid-client

Toggles visualization of tables.

track-changes

Starts or stops the Track Changes mode.

underline

Underlines the text at the caret position or the current selection and enables typing of underlined text.

undo

The last action performed inside the editor is undone.

zoom-100-client

Sets the zoom level of the content in the editor to 100%. This does not affect actual content size, but only the way it is displayed.

zoom-client

Sets the zoom level of the content in the editor to the supplied value. This does not affect actual content size, but only the way it is displayed. This action needs an action command if it is invoked via invokeAction. Possible values are numbers between 0.1 and 3.

Invoking the zoom-client action with an action command
editor.invokeAction("zoom-client", "0.6");
editor.invokeAction("zoom-client", "2");
zoom-mode-window-height-client

Zooms the editor to display the entire height of the page.

zoom-mode-window-width-client

Zooms the editor to display the entire width of the page.

Default Keyboard Shortcuts

 

PC Shortcut Mac Shortcut Action
ctrl + b command + b bold
ctrl + subtract command + semicolon decrease-zoom
back-space, shift-backspace back-space, shift-backspace delete-backward
delete delete delete-forward
ctrl + delete command + delete delete-next-word
ctrl + back-space command + back-space delete-previous-word
ctrl + f command + f find-replace-dialog
ctrl + g command + g find-next
ctrl + shift + g command + shift + g find-previous
ctrl + add command + quote increase-zoom-client
ctrl + shift + d command + shift + d insert-date
shift + enter shift + enter insert-line-break
ctrl + enter command + enter insert-page-break
ctrl + i command + i italic
ctrl + end command + down move-document-end
ctrl + home command + up move-document-start
down down move-down, move-shape-down
left left move-left, move-shape-left
end command + right move-line-end
home command + left move-line-start
ctrl + down command + down move-next-block
ctrl + page-down command + page-down move-next-page
page-down page-down move-page-down
page-up page-up move-page-up
ctrl + up command + up move-previous-block
ctrl + page-up command + page-up move-previous-page
right right move-right, move-shape-right
up up move-up, move-shape-up
ctrl + left alt + left move-word-left
ctrl + right alt + right move-word-right
ctrl + y command + y redo
ctrl + r f5 refresh-all
enter enter return-key
ctrl + a command + a select-all, select-positioned-content
ctrl + shift + end shift + end select-document-end
ctrl + shift + home shift + home select-document-start
shift + down shift + down select-down
shift + left shift + left select-left
shift + end shift + command + right select-line-end
shift + home shift + command + left select-line-start
ctrl + shift + down shift + alt + down select-next-block
ctrl + shift + page-down command + shift + page-down select-next-page
shift + page-down shift + page-down select-page-down
shift + page-up shift + page-up select-page-up
ctrl + shift + up shift + alt + up select-previous-block
ctrl + shift + page-up command + shift + page-up select-previous-page
shift + right shift + right select-right
shift + up shift + up select-up
ctrl + shift + left shift + alt + left select-word-left
ctrl + shift + right shift + alt + right select-word-right
shift + tab shift + tab shift-tab-key
ctrl + shift + f shift + alt + f switch-focus-area
tab tab tab-key
ctrl + 1 alt + F1 toggle-heading-1
ctrl + 2 alt + F2 toggle-heading-2
ctrl + 3 alt + F3 toggle-heading-3
ctrl + 4 alt + F4 toggle-heading-4
ctrl + 5 alt + F5 toggle-heading-5
ctrl + 6 alt + F6 toggle-heading-6
ctrl + shift + a shift + alt + a toggle-accessibility-mode
ctrl + u command + u underline
ctrl + z command + z undo
ctrl + numpad0 command + numpad0 zoom-100