Skip to main content

Principle

The SelectComponentPlugin makes it easy for users to select a component corresponding to a set of criteria. The criteria defined are used to execute a component search, the results of which are displayed in a selection popup.

Use

KeyTypeDescription
iconStringSelection popup icon
titleStringSelection popup title
descriptionStringDescription displayed in selection popup header
categoryStringComponent category to search (default: DOCUMENT)
criteriaTableList of search criteria
fieldToDisplayStringField used to display a component (default: name)
callbackFunctionFunction called after the selection validation
new SelectComponentPlugin({
title: "My title",
description: "Select a component",
callback: (id, label) => {
console.log("selected document: " + id);
},
}).show();

Model selection

Based on the SelectComponentPlugin plugin, the SelectTemplatePlugin plugin offers users a library of document templates. By defining the type of model to be proposed, users can select the model to be used from the library.

new SelectTemplatePlugin({
'type': 'MSWord',
'callback': function(id, label){
new DownloadWordPlugin({'template': id, 'filename': label}).download();

}).show();