Skip to content
Document Authoring DA  API Docs v1.22.2
npmGitHub

actionCalls>= v1.23.0

const actionCalls: ActionCalls

Builds calls to the built-in actions for editor.executeAction(). Each method is named by a built-in action ID and takes that action’s arguments, so your editor shows the action’s documentation and the compiler checks the arguments. ActionCalls lists every built-in action and its parameters.

Calls to custom actions, or to an ID only known at runtime, are plain ActionCall objects. executeAction() checks those only at runtime.

import { actionCalls } from '@nutrient-sdk/document-authoring';
await editor.executeAction(actionCalls['formatting.bold'](true));
await editor.executeAction(actionCalls['layout.page-margin']('l', 72)); // points
// A custom action
await editor.executeAction({ id: 'custom.save', args: ['/api/save'] });