|
1 | 1 | --- |
2 | 2 | layout: post |
3 | | -title: Add Save button in Javascript Pdfviewer control | Syncfusion |
4 | | -description: Learn here all about How to add save button in Toolbar in Syncfusion Javascript Pdfviewer control of Syncfusion Essential JS 2 and more. |
| 3 | +title: Add Save button to the built-in toolbar in JavaScript PDF Viewer | Syncfusion |
| 4 | +description: Learn how to add, show, hide, enable, and disable a custom Save button in the built-in toolbar of the JavaScript PDF Viewer component. |
5 | 5 | platform: document-processing |
6 | 6 | control: Toolbar |
7 | | -publishingplatform: Javascript |
8 | 7 | documentation: ug |
9 | 8 | domainurl: ##DomainURL## |
10 | 9 | --- |
11 | 10 |
|
12 | | -# Add Save button in Built-In Toolbar |
| 11 | +# Add a Save button to the built-in toolbar |
13 | 12 |
|
14 | | -PDF Viewer allows you to customize (add, show, hide, enable, and disable) existing items in a toolbar. |
| 13 | +PDF Viewer supports customizing toolbar items, including adding, showing, hiding, enabling, and disabling items. |
15 | 14 |
|
16 | | -* Save button - `Save` button-item can defined by [**CustomToolbarItemModel**](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/customToolbarItem/) and with existing items in [**ToolbarSettings**](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbarSettings/) property. Newly added save button-item click action can be defined in [`toolbarclick`](https://ej2.syncfusion.com/javascript/documentation/api/toolbar/clickEventArgs/). |
| 15 | +- Save button: The Save button can be defined using [CustomToolbarItemModel](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/customToolbarItem/) and included alongside existing items via [ToolbarSettings](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbarSettings/). Handle the click action using [`toolbarclick`](https://ej2.syncfusion.com/javascript/documentation/api/toolbar/clickEventArgs/). |
17 | 16 |
|
18 | | -* Show, Hide - `Save` button-item can be shown or hidden using the [`ToolbarSettings`](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbarSettings/) property. Pre-defined toolbar items are available with [`ToolbarItem`](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbarItem/). |
| 17 | +- Show or hide: The Save button can be shown or hidden using [ToolbarSettings](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbarSettings/). Predefined items are listed under [`ToolbarItem`](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbarItem/). |
19 | 18 |
|
20 | | -* Enable, Disable - `Save` button-item can be enabled or disable using [`enabletoolbaritem`](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbar/#enabletoolbaritem) |
| 19 | +- Enable or disable: The Save button can be enabled or disabled using [`enabletoolbaritem`](https://ej2.syncfusion.com/javascript/documentation/api/pdfviewer/toolbar/#enabletoolbaritem). |
21 | 20 |
|
22 | 21 | {% tabs %} |
23 | 22 | {% highlight js tabtitle="Standalone" %} |
@@ -79,35 +78,33 @@ function OnCreateSearch() { |
79 | 78 | {% endhighlight %} |
80 | 79 | {% endtabs %} |
81 | 80 |
|
| 81 | +N> Default toolbar items: ['OpenOption', 'PageNavigationTool','MagnificationTool', 'PanTool', 'SelectionTool', 'SearchOption', 'PrintOption', 'DownloadOption','UndoRedoTool', 'AnnotationEditTool', 'FormDesignerEditTool', 'CommentTool', 'SubmitForm'] |
82 | 82 |
|
83 | | -N> Default value of toolbar items is ['OpenOption', 'PageNavigationTool','MagnificationTool', 'PanTool', 'SelectionTool', 'SearchOption', 'PrintOption', 'DownloadOption','UndoRedoTool', 'AnnotationEditTool', 'FormDesignerEditTool', 'CommentTool', 'SubmitForm'] |
| 83 | +### Align property |
84 | 84 |
|
85 | | -### Align Property |
| 85 | +Specifies the alignment of the Save button within the toolbar. |
86 | 86 |
|
87 | | -The align property is used to specify the alignment of a `save` button-item within the toolbar. |
| 87 | +- Left: Aligns the item to the left side of the toolbar. |
| 88 | +- Right: Aligns the item to the right side of the toolbar. |
88 | 89 |
|
89 | | -`Left`: Aligns the item to the left side of the toolbar. |
90 | | -`Right`: Aligns the item to the right side of the toolbar. |
| 90 | +### Tooltip property |
91 | 91 |
|
92 | | -### Tooltip Property |
| 92 | +Sets the tooltip text for the Save button. The tooltip provides additional information on hover. |
93 | 93 |
|
94 | | -The tooltip property is used to set the tooltip text for a `save` button-item. Tooltip provides additional information when a user hovers over the item. |
| 94 | +### CssClass property |
95 | 95 |
|
96 | | -### CssClass Property |
| 96 | +Applies custom CSS classes to the Save button for styling. |
97 | 97 |
|
98 | | -The cssClass property is used to apply custom CSS classes to a `save` button-item. It allows custom styling of the `save` button-item. |
| 98 | +### Prefix property |
99 | 99 |
|
100 | | -### Prefix Property |
| 100 | +Sets the CSS class or icon to add as a prefix to the Save button content. |
101 | 101 |
|
102 | | -The prefix property is used to set the CSS class or icon that should be added as a prefix to the existing content of the `save` button-item. |
| 102 | +### ID property |
103 | 103 |
|
104 | | -### ID Property |
| 104 | +The id property within a CustomToolbarItemModel is required and uniquely identifies each toolbar item for configuration and interaction. |
105 | 105 |
|
106 | | -The id property within a CustomToolbarItemModel is a compulsory attribute that plays a vital role in toolbar customization. It serves as a unique identifier for each toolbar item, facilitating distinct references and interactions. |
| 106 | +When defining or customizing toolbar items, assign a specific, descriptive id to each item. These properties are commonly used when defining custom toolbar items with `CustomToolbarItemModel` in the context of Syncfusion PDF Viewer. When configuring the toolbar using the `ToolbarSettings` property, include these properties to customize appearance and behavior. |
107 | 107 |
|
108 | | -When defining or customizing toolbar items, it is mandatory to assign a specific and descriptive id to each item. |
109 | | -These properties are commonly used when defining custom toolbar items with the `CustomToolbarItemModel`` in the context of Syncfusion PDF Viewer. When configuring the toolbar using the `ToolbarSettings`` property, you can include these properties to customize the appearance and behavior of each toolbar item. |
110 | | - |
111 | | -N> When customizing `save` button-item, you have the flexibility to include either icons or text based on your design preference. |
| 108 | +N> When customizing the Save button, icons or text can be used based on design preference. |
112 | 109 |
|
113 | 110 | [View sample in GitHub](https://github.com/SyncfusionExamples/javascript-pdf-viewer-examples/tree/master/How%20to/Add%20Save%20Button%20In%20Toolbar) |
0 commit comments