This commit is contained in:
Philipp Kühn
2020-12-02 12:05:39 +01:00
5 changed files with 20 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
# Suggestion
TODO
- mentions
- hashtags
- emojis

View File

@@ -0,0 +1,3 @@
# Table
TODO

View File

@@ -244,7 +244,7 @@ server.listen()
``` ```
### Send it to an API ### Send it to an API
To pass the updated documents to an API, or to a database, you can use the `onChange` hook, which is executed when a document changes. With the `debounce` setting you can slow down the execution, with the `debounceMaximum` setting you can make sure the content is sent at least every few seconds: To pass the updated documents to an API, or to a database, you can use the `onChange` hook, which is executed when a document changes. With the `debounce` setting you can slow down the execution, with the `debounceMaxWait` setting you can make sure the content is sent at least every few seconds:
```js ```js
import { Server } from '@hocuspocus/server' import { Server } from '@hocuspocus/server'
@@ -254,7 +254,7 @@ const server = Server.configure({
debounce: 2000, debounce: 2000,
// maximum time to wait (in milliseconds) // maximum time to wait (in milliseconds)
debounceMaximum: 10000, debounceMaxWait: 10000,
// executed when the document is changed // executed when the document is changed
onChange(data) { onChange(data) {

View File

@@ -1,4 +1,4 @@
# Advanced node views # Complex node views
## toc ## toc

View File

@@ -51,7 +51,7 @@
link: /guide/store-content link: /guide/store-content
- title: Build extensions - title: Build extensions
link: /guide/build-extensions link: /guide/build-extensions
- title: Define node views - title: Complex node views
link: /guide/node-views link: /guide/node-views
draft: true draft: true
- title: Working with TypeScript - title: Working with TypeScript
@@ -91,6 +91,9 @@
link: /api/nodes/ordered-list link: /api/nodes/ordered-list
- title: Paragraph - title: Paragraph
link: /api/nodes/paragraph link: /api/nodes/paragraph
- title: Table
link: /api/nodes/table
draft: true
- title: TaskList - title: TaskList
link: /api/nodes/task-list link: /api/nodes/task-list
- title: TaskItem - title: TaskItem
@@ -135,6 +138,9 @@
link: /api/extensions/gapcursor link: /api/extensions/gapcursor
- title: History - title: History
link: /api/extensions/history link: /api/extensions/history
- title: Suggestion
link: /api/extensions/suggestion
draft: true
- title: TextAlign - title: TextAlign
link: /api/extensions/text-align link: /api/extensions/text-align
- title: Typography - title: Typography