update content

This commit is contained in:
Hans Pagel 2020-11-06 11:37:30 +01:00
parent 7fa5ad5db4
commit 645ec6e153
5 changed files with 11 additions and 7 deletions

View File

@ -17,6 +17,10 @@ const CustomDocument = Document.extend({
content: 'taskList', content: 'taskList',
}) })
const CustomTaskItem = TaskItem.extend({
content: 'paragraph',
})
export default { export default {
components: { components: {
EditorContent, EditorContent,
@ -35,10 +39,10 @@ export default {
Paragraph(), Paragraph(),
Text(), Text(),
TaskList(), TaskList(),
TaskItem(), CustomTaskItem(),
], ],
content: ` content: `
<ul data-type="task_list"> <ul data-type="taskList">
<li data-type="taskItem" data-checked="true">A list item</li> <li data-type="taskItem" data-checked="true">A list item</li>
<li data-type="taskItem" data-checked="false">And another one</li> <li data-type="taskItem" data-checked="false">And another one</li>
</ul> </ul>

View File

@ -18,7 +18,7 @@ While thats perfectly fine and does make the selected bold, youd likely wa
Most commands can be executed combined to one call. First of all, thats shorter than separate function call in most cases. Here is an example to make the selected text bold: Most commands can be executed combined to one call. First of all, thats shorter than separate function call in most cases. Here is an example to make the selected text bold:
```js ```js
editor.chain().focus().bold().run() editor.chain().bold().focus().run()
``` ```
The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Between those two functions, this example combines to different commands. The `.chain()` is required to start a new chain and the `.run()` is needed to actually execute all the commands in between. Between those two functions, this example combines to different commands.

View File

@ -1,9 +1,9 @@
# Collaboration Cursor # CollaborationCursor
This extension adds information about all connected users (like their name and a specified color), their current cursor position and their text selection (if theres one). This extension adds information about all connected users (like their name and a specified color), their current cursor position and their text selection (if theres one).
Open this page in multiple browser windows to test it. Open this page in multiple browser windows to test it.
:::premium 💖 Pro Extension :::premium Pro Extension
We kindly ask you to sponsor us, before using this extension in production. [Read more](/sponsor) We kindly ask you to sponsor us, before using this extension in production. [Read more](/sponsor)
::: :::

View File

@ -1,6 +1,6 @@
# Collaborative editing # Collaborative editing
:::premium Requires pro extensions :::premium Requires Pro Extensions
We kindly ask you to sponsor us, before using this example in production. [Read more](/sponsor) We kindly ask you to sponsor us, before using this example in production. [Read more](/sponsor)
::: :::

View File

@ -1,4 +1,4 @@
# Build your editor # Create your editor
## toc ## toc