As a plug-in developer you can add settings to your plug-in which can be set by the user in Touch Portals settings window. These settings can be changed by the user and when the user changes them, a message to the plug-in is send to the plug-in application.
Key | Type | Req. | Api | Description |
---|---|---|---|---|
name | Text | Yes | 3.0 | This is the name of the settings in the settings overview. This is also the identifier. |
default | Text | No | 3.0 | This will be the default value for your setting. |
type | Text | Yes | 3.0 | This will specify what type of settings you can use. Currently you can only use "text" or "number". |
maxLength | Number | No | 3.0 | This is the max amount of characters a text settings value can have. |
isPassword | Switch | No | 3.0 | If the setting is of the type "password" you should enable this as it will hide the characters from the input field. It will show dots instead. Please do know that communication between Touch Portal and the plug-in is open text. This option is made so that random people will not be able to peek at the password field. It is not secure. |
minValue | Number | No | 3.0 | The minimum number value allowed for a number type setting. |
maxValue | Number | No | 3.0 | The maximum number value allowed for a number type setting. |
readOnly | Switch | No | 3.0 | For some settings you do not want the user to edit them but you do want to share them. Using this switch will allow you to do so. Updating these setting values should be done with the dynamic functions. |
tooltip | Object | No | 7.0 | An optional tooltip object allowing you to explain more about the setting. |
The following shows the Tooltip object that you can reference in the setting data.
Key | Type | Req. | API | Description |
---|---|---|---|---|
title | Text | No | 7.0 | This is the title for the tooltip. If this is not added or is left empty, the title will not be shown in the tooltip. |
body | Text | Yes | 7.0 | This is the body for the tooltip. This text is mandatory. |
docUrl | Text | No | 7.0 | This is the url to the documentation if this is available. If this is empty, no link to documentation is added in the tooltip. |
This shows a JSON of a setting.
This shows a JSON of a setting with a Tooltip.