Updated Enabling the widget (markdown)

DemonWareXT 2021-12-19 00:34:19 +01:00
parent 73698b206a
commit 79eb634423
1 changed files with 15 additions and 23 deletions

@ -3,36 +3,28 @@
contain sensitive data. contain sensitive data.
2. Using `/devtools` in Element Web, edit the `m.widgets` account data event to 2. Using `/devtools` in Element Web, edit the `m.widgets` account data event to
have the following content: have the following content:
```json ```json
{ {
"type": "m.widgets",
"content": {
"stickerpicker": { "stickerpicker": {
"content": { "content": {
"type": "m.stickerpicker", "type": "m.stickerpicker",
"url": "https://demonwarext.github.io/stickerpicker/web/?theme=$theme", "url": "https://your.sticker.picker.url/?theme=$theme",
"name": "Stickerpicker", "name": "Stickerpicker",
"data": {} "data": {}
}, },
"sender": "@you:matrix.server.name", "sender": "@you:picker.url",
"state_key": "stickerpicker", "state_key": "stickerpicker",
"type": "m.widget", "type": "m.widget",
"id": "stickerpicker" "id": "stickerpicker"
} }
} }
}
``` ```
If you do not yet have a `m.widgets` event, simply create it with that content. If you do not yet have a `m.widgets` event, simply create it with that content.
You can also [use the client-server API directly][1] instead of using Element Web. You can also [use the client-server API directly][1] instead of using Element Web.
The `theme=$theme` query parameter will make the widget conform to Element's The `theme=$theme` query parameter will make the widget conform to Element's
theme automatically. You can also use `light`, `dark` or `black` instead of theme automatically. You can also use `light`, `dark` or `black` instead of
`$theme` to always use a specific theme. `$theme` to always use a specific theme.
You can use https://maunium.net/stickers-demo/ as the URL to try out the You can use https://maunium.net/stickers-demo/ as the URL to try out the
picker without hosting the files yourself. picker without hosting the files yourself.
3. Open the sticker picker and enjoy the fast sticker picking experience. 3. Open the sticker picker and enjoy the fast sticker picking experience.
[1]: https://matrix.org/docs/spec/client_server/latest#put-matrix-client-r0-user-userid-account-data-type [1]: https://matrix.org/docs/spec/client_server/latest#put-matrix-client-r0-user-userid-account-data-type