Nutrient Web SDK
    Preparing search index...

    Type Alias SetDocumentEditorToolbarFunction

    SetDocumentEditorToolbarFunction: (
        currentState: DocumentEditorToolbarItem[],
    ) => DocumentEditorToolbarItem[]

    This callback can be used in the setDocumentEditorToolbarItems() method to do atomic updates to the document editor toolbar items.

    Type Declaration

    Use ES2015 arrow functions and the update callback to reduce boilerplate

    instance.setDocumentEditorToolbarItems(items => {
    const button = instance.contentDocument.createElement('div');
    button.innerText = "Do something"
    items.push({
    type: "custom",
    node: button,
    onPress(){
    alert("Do Something");
    }
    });
    return items;
    });