mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 15:49:23 +08:00
remove test
This commit is contained in:
parent
47114d86c2
commit
d5f4129835
@ -48,13 +48,13 @@
|
||||
There is always something to do. Thankfully, there are checklists for that. Don't forget to call mom.
|
||||
</p>
|
||||
<ul data-type="todo_list">
|
||||
<li data-type="todo_item" data-done="true" :custom-prop="customProp">
|
||||
<li data-type="todo_item" data-done="true">
|
||||
Buy beer
|
||||
</li>
|
||||
<li data-type="todo_item" data-done="true" :custom-prop="customProp">
|
||||
<li data-type="todo_item" data-done="true">
|
||||
Buy meat
|
||||
</li>
|
||||
<li data-type="todo_item" data-done="true" :custom-prop="customProp">
|
||||
<li data-type="todo_item" data-done="true">
|
||||
Buy milk
|
||||
</li>
|
||||
<li data-type="todo_item" data-done="false">
|
||||
|
@ -21,9 +21,6 @@ export default class TodoItemNode extends Node {
|
||||
<li data-type="todo_item" :data-done="node.attrs.done.toString()">
|
||||
<span class="todo-checkbox" contenteditable="false" @click="onChange"></span>
|
||||
<div class="todo-content" ref="content" :contenteditable="editable.toString()"></div>
|
||||
<div>
|
||||
{{ node.attrs.customProp }}
|
||||
</DIV>
|
||||
</li>
|
||||
`,
|
||||
}
|
||||
@ -35,19 +32,15 @@ export default class TodoItemNode extends Node {
|
||||
done: {
|
||||
default: false,
|
||||
},
|
||||
customProp: {
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
draggable: false,
|
||||
content: 'paragraph',
|
||||
toDOM(node) {
|
||||
const { done, customProp } = node.attrs
|
||||
const { done } = node.attrs
|
||||
|
||||
return ['li', {
|
||||
'data-type': 'todo_item',
|
||||
'data-done': done.toString(),
|
||||
'custom-prop': customProp.toString(),
|
||||
},
|
||||
['span', { class: 'todo-checkbox', contenteditable: 'false' }],
|
||||
['div', { class: 'todo-content' }, 0],
|
||||
@ -58,7 +51,6 @@ export default class TodoItemNode extends Node {
|
||||
tag: '[data-type="todo_item"]',
|
||||
getAttrs: dom => ({
|
||||
done: dom.getAttribute('data-done') === 'true',
|
||||
customProp: dom.getAttribute('custom-prop'),
|
||||
}),
|
||||
}],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user