This function allows you to add a custom snap-in.
Parameters
- docuViewareID
- The identifier for the DocuVieware™ instance you want to add the custom snap-in to.
- name
- A string that represents the name of your snap-in, this is what will be used later for interaction.
- caption
- A string that represents the caption of your snap-in, this is the title that will be displayed next to the collapse button.
- icon
- Either a string that contains SVG markup or a DOM element (see example below).
- panel
- Either a string that contains the panel markup or a DOM element (see example below).
- visible
- A boolean to define if the snap-in shall be visible on creation.
- onSelection
- A function that will be executed upon snap-in selection (optional).
Return Value
1 if error, 0 if success.
Example of usage
This JavaScript add a new snap-in to DocuVieware instance called "DocuVieware1" with icon and content.