You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,11 @@ You specify the editable options of your extension in a JSON document. This docu
94
94
["value314159", "pi"] // Third dropdown, Displays "pi" to user, but the stored value is "value314159"
95
95
],
96
96
97
+
// For "list"
98
+
99
+
"style":"csv"// comma-separated list (optional, default)
100
+
"style":"textblock"// mutli-line text, one item per line.
101
+
97
102
// For "file" (a file picker)
98
103
99
104
"accept":"image/*,video/*,.webp", // The extensions or mime types to filter by
@@ -151,7 +156,7 @@ Example JSON:
151
156
"name" : "sampleSelect",
152
157
"type" : "select",
153
158
"label" : "Sample Selection",
154
-
"description" : "A list of simple values, or values and their labels",
159
+
"description" : "A selector among simple values, or values with custom labels",
155
160
"values" : [
156
161
"Value1", "Value2", ["Value3", "Value3's Label"]
157
162
],
@@ -170,14 +175,31 @@ Example JSON:
170
175
"label" : "Sample Block",
171
176
"description" : "A multiline text block"
172
177
},
178
+
{
179
+
"name" : "sampleCSVList",
180
+
"type" : "list",
181
+
"style" : "csv",
182
+
"label" : "Sample CSV List",
183
+
"description" : "A list of simple strings, separated by commas",
184
+
"default" : ["one", "two", "three"]
185
+
},
186
+
{
187
+
"name" : "sampleBlockList",
188
+
"type" : "list",
189
+
"style" : "textblock",
190
+
"shape" : "list",
191
+
"label" : "Sample Multiline List",
192
+
"description" : "A list of simple strings, one per line",
193
+
"default" : ["one", "two", "three"]
194
+
},
173
195
{
174
196
"name" : "sampleFile",
175
197
"type" : "file",
176
198
"label" : "Sample File",
177
199
"description" : "A chooser for file paths, with optional type filter",
178
200
"accept" : "image/*"
179
201
},
180
-
202
+
181
203
{
182
204
"name" : "sampleBooleanDependency",
183
205
"type" : "boolean",
@@ -247,6 +269,12 @@ The expression can have the usual simple operators:
247
269
248
270
The simplest, and probably most useful expression, is simply the name of another simple boolean option: When it is checked, the option shows, and is hidden when the option is unchecked.
249
271
272
+
### Lists
273
+
274
+
Lists/Arrays of strings are currently supported with the "**list**" option type. It comes in two flavors:
275
+
*`style: "csv"` : List items separated by commas (with any surrounding spaces removed)
276
+
*`style: "textblock"` : List items are one per line.
277
+
250
278
### Option Groups
251
279
252
280
You can create a group of options with an option of `"type" : "group"`. The `"name"` is optional.
0 commit comments