Skip to content

Content Editor Toolbar

The content editing toolbar in ComPDFKit can be flexibly configured to enable content editing types and tools. This section describes how to customize the content editing toolbar.

Default ToolBar

The default content editor toolbar contains the following editor types and tools:

AndroidiOS

Customizing the Toolbar Buttons

You can enable or hide specific edit types by setting the availableTypes property in the contentEditorConfig object. The following example shows how to adjust the order of edit types and hide the settings button for the content editing tool.

tsx
let config = ComPDFKit.getDefaultConfig({
  contentEditorConfig: {
    availableTypes: [
      CPDFContentEditorType.EDITOR_IMAGE,
      CPDFContentEditorType.EDITOR_TEXT
    ],
    availableTools: [
      CPDFConfigTool.UNDO,
      CPDFConfigTool.REDO,
    ]
  }
});
ComPDFKit.openDocument(_document, '', config);

The customized toolbar will look like what’s shown below.

AndroidiOS

Available Toolbar Customization Options

Type
EDITOR_TEXT
EDITOR_IMAGE

Note: Please refer to CPDFContentEditorType for the relevant options.

Available Toolbar Tool Customization Options

ToolDescription
SETTINGSet button, corresponding to open the selected annotation, text or picture property panel.
UNDOUndo annotation, content editing, form operations.
REDORedo an undone action