mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-30 21:45:01 +02:00
UBER-1249 Make document Todos work with Heap (#4886)
This commit is contained in:
@@ -29,7 +29,8 @@
|
||||
} from '@hcengineering/text-editor'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
import ToDoNodeView from './node-view/ToDoNodeView.svelte'
|
||||
import ToDoItemNodeView from './node-view/ToDoItemNodeView.svelte'
|
||||
import ToDoListNodeView from './node-view/ToDoListNodeView.svelte'
|
||||
|
||||
export let object: Document
|
||||
export let readonly = false
|
||||
@@ -55,14 +56,23 @@
|
||||
}),
|
||||
TodoItemExtension.extend({
|
||||
addNodeView () {
|
||||
return SvelteNodeViewRenderer(ToDoNodeView, { contentAs: 'li', componentProps: { object } })
|
||||
return SvelteNodeViewRenderer(ToDoItemNodeView, {
|
||||
contentAs: 'li',
|
||||
contentClass: 'todo-item',
|
||||
componentProps: { object },
|
||||
ignoreMutation: () => true
|
||||
})
|
||||
}
|
||||
}).configure({
|
||||
HTMLAttributes: {
|
||||
class: 'todo-item'
|
||||
}
|
||||
}),
|
||||
TodoListExtension.configure({
|
||||
TodoListExtension.extend({
|
||||
addNodeView () {
|
||||
return SvelteNodeViewRenderer(ToDoListNodeView, { ignoreMutation: () => true })
|
||||
}
|
||||
}).configure({
|
||||
HTMLAttributes: {
|
||||
class: 'todo-list'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user