Skip to content

Commit 3e3885f

Browse files
document how to add a chat widget to a page
1 parent e9cbc5a commit 3e3885f

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,25 @@ While viewing one of those examples, you can open the web console in your browse
3131
try how you can create a button:
3232
```js
3333
const solidLogo = 'https://solidproject.org/assets/img/solid-emblem.svg'
34-
const exampleFolder = 'https://example-user.inrupt.net/public/public-control/'
3534
const myButton = UI.widgets.button(document, solidLogo, 'test', () => window.alert('clicked!'))
3635
UI.widgets.clearElement(document.body)
3736
document.body.appendChild(myButton)
37+
```
38+
39+
Or a chat widget:
40+
```js
41+
const chatChannel = 'https://example-user.inrupt.net/public/example-chat/index.ttl#this'
42+
const chat = UI.infiniteMessageArea(document, UI.store, UI.rdf.namedNode(chatChannel))
43+
document.body.appendChild(chat)
44+
```
45+
46+
Or a full ACL Control Box:
47+
```js
48+
const exampleFolder = 'https://example-user.inrupt.net/public/public-control/'
3849
const aclControlBox = UI.aclControl.ACLControlBox5(UI.rdf.namedNode(exampleFolder), { dom: document }, '', UI.store)
3950
document.body.appendChild(aclControlBox)
4051
```
52+
4153
See https://solid.github.io/solid-ui/Documentation/api/ for the API documentation.
4254

4355
## Overview

0 commit comments

Comments
 (0)