mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
Update README.md
This commit is contained in:
parent
7978257b06
commit
528ee75ebd
14
README.md
14
README.md
@ -44,20 +44,20 @@ const connection = new CollaborativeBackend(options)
|
|||||||
### options:
|
### options:
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
port: number
|
port: number // posrt to start io connection
|
||||||
connectOpts?: SocketIO.ServerOptions
|
connectOpts?: SocketIO.ServerOptions
|
||||||
defaultValue?: ValueJSON
|
defaultValue?: ValueJSON // default value
|
||||||
saveTreshold?: number
|
saveTreshold?: number // theshold of onDocumentSave callback execution
|
||||||
cursorAnnotationType?: string
|
cursorAnnotationType?: string // type string for cursor annotations
|
||||||
onAuthRequest?: (
|
onAuthRequest?: ( // auth callback
|
||||||
query: Object,
|
query: Object,
|
||||||
socket?: SocketIO.Socket
|
socket?: SocketIO.Socket
|
||||||
) => Promise<boolean> | boolean
|
) => Promise<boolean> | boolean
|
||||||
onDocumentLoad?: (
|
onDocumentLoad?: ( // request slatejs document callback
|
||||||
pathname: string,
|
pathname: string,
|
||||||
query?: Object
|
query?: Object
|
||||||
) => ValueJSON | null | false | undefined
|
) => ValueJSON | null | false | undefined
|
||||||
onDocumentSave?: (pathname: string, json: ValueJSON) => Promise<void> | void
|
onDocumentSave?: (pathname: string, json: ValueJSON) => Promise<void> | void // save document callback
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user