diff --git a/docs/plugin-docs.md b/docs/plugin-docs.md index dd32642e..4d4e04d1 100644 --- a/docs/plugin-docs.md +++ b/docs/plugin-docs.md @@ -36,6 +36,8 @@ Current API Version: `hain-0.4.0` * [hain-plugin-http-codes](https://github.com/quinnjn/hain-plugin-http-codes) - `hain-0.3.0` * [hain-plugin-material-colors](https://github.com/aouerfelli/hain-plugin-material-colors) +- `hain-0.4.0` + * not yet ## Guides diff --git a/docs/preferences-json-format.md b/docs/preferences-json-format.md index d5892197..32f9c3eb 100644 --- a/docs/preferences-json-format.md +++ b/docs/preferences-json-format.md @@ -84,6 +84,21 @@ See [PreferencesObject](preferences-object.md) } ``` +* **Enum Values** + You can define enum values for string property + + **Example** + ```json + { + "type": "string", + "enum": [ + "a", + "b", + "c" + ] + } + ``` + ## Limitations Currently, Type of root object must be `object`. diff --git a/docs/search-result.md b/docs/search-result.md index 2e226962..069093e9 100644 --- a/docs/search-result.md +++ b/docs/search-result.md @@ -4,8 +4,8 @@ SearchResult is a plain object which has a following format: * `id` Any - An identifier (recommend to be unique), used as argument of `execute` function (optional, default is `undefined`) * `payload` Any - Extra information, used as a argument of `execute` function (optional, default is `undefined`) -* `title` String - Title text, See [Text Format](text-format.md) (**required**) -* `desc` String - Description text, See [Text Format](text-format.md) (**required**) +* `title` String or Object - Title text, See [Text Format](text-format.md)(**required**) +* `desc` String or Object - Description text, See [Text Format](text-format.md) (**required**) * `icon` String - Icon URL, See [Icon URL Format](icon-url-format.md) (optional, default is `icon` of package.json) * `redirect` String - Redirection query (optional, default is `undefined`) * `group` String - Result group name (optional, default is `group` of package.json) diff --git a/docs/text-format.md b/docs/text-format.md index caf323c7..cc48e4bc 100644 --- a/docs/text-format.md +++ b/docs/text-format.md @@ -9,6 +9,12 @@ You can use tags like: You should carefully use these tags to avoid breaking layout. +and you can use a string for text or a object for text with options. + +**Available Options** +* `singleLine` Boolean - Display as Single line +* `text` String - Text + **Example** ```javascript function search(query, res) { @@ -17,4 +23,15 @@ function search(query, res) { desc: 'blue text' }); } +``` +- with Options +```javascript +function search(query, res) { + res.add({ + title: { + singleLine: true, + text: 'Title' + } + }); +} ``` \ No newline at end of file