Document View Toolbar
- Last UpdatedMay 10, 2023
- 1 minute read
This section describes the parameters that can be used in the JS file when creating an extension to add button(s) to the Document View toolbar that will open floating and docked panels. A floating panel opens at a specified position and is made draggable by the framework, the docked panels are opened in a container below the Document View.
Registration
Method: DocumentViewToolbar.registerGroup(id, definition)
Registration Definition Parameters
|
Parameter |
Description |
Required/Optional |
Default Value |
|---|---|---|---|
|
text |
The text to display for the group of tools. |
Required |
|
|
order |
The order in which it should be displayed. |
Optional |
10000 |
|
iconClass |
A css class that can be used to give the group an icon on the toolbar. |
Optional |
Method: DocumentViewToolbar.register(id, definition)
Registration Definition Parameters
|
Parameter |
Description |
Required/Optional |
Default Value |
|---|---|---|---|
|
directive |
The name of the directive to use to fulfill the functionality. |
Required |
|
|
text |
The text to display for the action. |
Required |
|
|
type |
The type of the option. Either DocumentViewToolbar.types.floating or DocumentViewToolbar.types.docked |
Required |
|
|
order |
The order in which it should be displayed. |
Optional |
10000 |
|
group |
The group to which this function belongs. |
Optional |
|
|
when |
An expression or function that when true will show the option and when false will hide it. |
Optional |
Directive
Directive Scope Parameters
|
Parameter |
Description |
Required/Optional |
|---|---|---|
|
item |
The item which will be a document. |
Optional |
|
viewer |
The object containing all the options for the viewer. |
Optional |
|
file |
The file being displayed in the viewer. |
Optional |
|
selectedItem |
The item selected in the viewer. |
Optional |