refactoring
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { NodeViewWrapper } from '@tiptap/vue-3'
|
import { NodeViewWrapper, nodeViewProps } from '@tiptap/vue-3'
|
||||||
import { v4 as uuid } from 'uuid'
|
import { v4 as uuid } from 'uuid'
|
||||||
import * as d3 from 'd3'
|
import * as d3 from 'd3'
|
||||||
import simplify from 'simplify-js'
|
import simplify from 'simplify-js'
|
||||||
@@ -42,17 +42,7 @@ export default {
|
|||||||
NodeViewWrapper,
|
NodeViewWrapper,
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: nodeViewProps,
|
||||||
updateAttributes: {
|
|
||||||
type: Function,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
node: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Node, mergeAttributes } from '@tiptap/core'
|
import { VueNodeViewRenderer, Node, mergeAttributes } from '@tiptap/vue-3'
|
||||||
import { VueNodeViewRenderer } from '@tiptap/vue-3'
|
|
||||||
import Component from './Component.vue'
|
import Component from './Component.vue'
|
||||||
|
|
||||||
export default Node.create({
|
export default Node.create({
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import { Editor, EditorContent } from '@tiptap/vue-3'
|
import { Editor, EditorContent } from '@tiptap/vue-3'
|
||||||
import Document from '@tiptap/extension-document'
|
import Document from '@tiptap/extension-document'
|
||||||
import Text from '@tiptap/extension-text'
|
import Text from '@tiptap/extension-text'
|
||||||
import Paper from './Paper.js'
|
import Paper from './Paper'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
Reference in New Issue
Block a user