Edit

Office.NodeInsertedEventArgs interface

Provides information about the inserted node that raised the nodeInserted event.

Remarks

Examples

// Event handler for the NodeInserted event added in CustomXmlPart.addHandlerAsync.
function onNodeInserted(eventArgs: Office.NodeInsertedEventArgs) {
    // Logs information about the inserted node.
    console.log("NodeInserted event fired.");
    console.log("  Is undo/redo: " + eventArgs.isUndoRedo);
    eventArgs.newNode.getXmlAsync((result) => {
        if (result.status === Office.AsyncResultStatus.Succeeded) {
            console.log("  Inserted node XML: " + result.value);
        }
    });
}

Properties

isUndoRedo

Gets whether the node was inserted as part of an Undo/Redo action by the user.

newNode

Gets the node that was just added to the CustomXMLPart object.

Note that this node may have children, if a subtree was just added to the document.

Property Details

isUndoRedo

Gets whether the node was inserted as part of an Undo/Redo action by the user.

isUndoRedo: boolean;

Property Value

boolean

newNode

Gets the node that was just added to the CustomXMLPart object.

Note that this node may have children, if a subtree was just added to the document.

newNode: CustomXmlNode;

Property Value