Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

Commit

Permalink
Update docs for v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Heejin Lee committed Jun 11, 2016
1 parent 4f4980e commit 574ad37
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/plugin-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 15 additions & 0 deletions docs/preferences-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
4 changes: 2 additions & 2 deletions docs/search-result.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 17 additions & 0 deletions docs/text-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -17,4 +23,15 @@ function search(query, res) {
desc: '<span style="color: blue">blue</span> text'
});
}
```
- with Options
```javascript
function search(query, res) {
res.add({
title: {
singleLine: true,
text: '<b>Title</b>'
}
});
}
```

0 comments on commit 574ad37

Please sign in to comment.