Skip to content

Commit 574ad37

Browse files
author
Heejin Lee
committed
Update docs for v0.4.0
1 parent 4f4980e commit 574ad37

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

docs/plugin-docs.md

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Current API Version: `hain-0.4.0`
3636
* [hain-plugin-http-codes](https://github.com/quinnjn/hain-plugin-http-codes)
3737
- `hain-0.3.0`
3838
* [hain-plugin-material-colors](https://github.com/aouerfelli/hain-plugin-material-colors)
39+
- `hain-0.4.0`
40+
* not yet
3941

4042
## Guides
4143

docs/preferences-json-format.md

+15
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,21 @@ See [PreferencesObject](preferences-object.md)
8484
}
8585
```
8686

87+
* **Enum Values**
88+
You can define enum values for string property
89+
90+
**Example**
91+
```json
92+
{
93+
"type": "string",
94+
"enum": [
95+
"a",
96+
"b",
97+
"c"
98+
]
99+
}
100+
```
101+
87102
## Limitations
88103
Currently, Type of root object must be `object`.
89104

docs/search-result.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ SearchResult is a plain object which has a following format:
44

55
* `id` Any - An identifier (recommend to be unique), used as argument of `execute` function (optional, default is `undefined`)
66
* `payload` Any - Extra information, used as a argument of `execute` function (optional, default is `undefined`)
7-
* `title` String - Title text, See [Text Format](text-format.md) (**required**)
8-
* `desc` String - Description text, See [Text Format](text-format.md) (**required**)
7+
* `title` String or Object - Title text, See [Text Format](text-format.md)(**required**)
8+
* `desc` String or Object - Description text, See [Text Format](text-format.md) (**required**)
99
* `icon` String - Icon URL, See [Icon URL Format](icon-url-format.md) (optional, default is `icon` of package.json)
1010
* `redirect` String - Redirection query (optional, default is `undefined`)
1111
* `group` String - Result group name (optional, default is `group` of package.json)

docs/text-format.md

+17
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ You can use tags like:
99

1010
You should carefully use these tags to avoid breaking layout.
1111

12+
and you can use a string for text or a object for text with options.
13+
14+
**Available Options**
15+
* `singleLine` Boolean - Display as Single line
16+
* `text` String - Text
17+
1218
**Example**
1319
```javascript
1420
function search(query, res) {
@@ -17,4 +23,15 @@ function search(query, res) {
1723
desc: '<span style="color: blue">blue</span> text'
1824
});
1925
}
26+
```
27+
- with Options
28+
```javascript
29+
function search(query, res) {
30+
res.add({
31+
title: {
32+
singleLine: true,
33+
text: '<b>Title</b>'
34+
}
35+
});
36+
}
2037
```

0 commit comments

Comments
 (0)