On this page
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:
Android | iOS |
---|---|
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);
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
The customized toolbar will look like what’s shown below.
Android | iOS |
---|---|
Available Toolbar Customization Options
Type |
---|
EDITOR_TEXT |
EDITOR_IMAGE |
Note: Please refer to CPDFContentEditorType for the relevant options.
Available Toolbar Tool Customization Options
Tool | Description |
---|---|
SETTING | Set button, corresponding to open the selected annotation, text or picture property panel. |
UNDO | Undo annotation, content editing, form operations. |
REDO | Redo an undone action |