From fd94e321eaa1d8557b0a14c47c51ff36bb40ad89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 25 Nov 2020 17:58:53 +0100 Subject: [PATCH] cleanup drag handle example --- .../demos/Examples/DragHandle/Component.vue | 57 ++++++++++++++ .../Test.ts => DragHandle/DraggableItem.js} | 7 +- .../{NodeView => DragHandle}/index.vue | 45 ++++------- .../src/demos/Examples/NodeView/Component.vue | 78 ------------------- docs/src/demos/Examples/VModel/index.vue | 2 +- docs/src/docPages/examples/drag-handle.md | 2 +- docs/src/docPages/examples/node-view.md | 3 - docs/src/links.yaml | 3 + packages/vue/src/VueRenderer.ts | 1 + 9 files changed, 80 insertions(+), 118 deletions(-) create mode 100644 docs/src/demos/Examples/DragHandle/Component.vue rename docs/src/demos/Examples/{NodeView/Test.ts => DragHandle/DraggableItem.js} (85%) rename docs/src/demos/Examples/{NodeView => DragHandle}/index.vue (61%) delete mode 100644 docs/src/demos/Examples/NodeView/Component.vue delete mode 100644 docs/src/docPages/examples/node-view.md diff --git a/docs/src/demos/Examples/DragHandle/Component.vue b/docs/src/demos/Examples/DragHandle/Component.vue new file mode 100644 index 00000000..229bcf00 --- /dev/null +++ b/docs/src/demos/Examples/DragHandle/Component.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/docs/src/demos/Examples/NodeView/Test.ts b/docs/src/demos/Examples/DragHandle/DraggableItem.js similarity index 85% rename from docs/src/demos/Examples/NodeView/Test.ts rename to docs/src/demos/Examples/DragHandle/DraggableItem.js index 15d956e8..6f289e50 100644 --- a/docs/src/demos/Examples/NodeView/Test.ts +++ b/docs/src/demos/Examples/DragHandle/DraggableItem.js @@ -3,11 +3,10 @@ import { VueRenderer } from '@tiptap/vue' import Component from './Component.vue' export default Node.create({ - name: 'test', + name: 'draggableItem', group: 'block', - // content: 'inline*', content: 'block*', draggable: true, @@ -25,13 +24,13 @@ export default Node.create({ parseHTML() { return [ { - tag: 'div[data-type="test"]', + tag: 'div[data-type="draggable-item"]', }, ] }, renderHTML({ HTMLAttributes }) { - return ['div', mergeAttributes(HTMLAttributes, { 'data-type': 'test' }), 0] + return ['div', mergeAttributes(HTMLAttributes, { 'data-type': 'draggable-item' }), 0] }, addNodeView() { diff --git a/docs/src/demos/Examples/NodeView/index.vue b/docs/src/demos/Examples/DragHandle/index.vue similarity index 61% rename from docs/src/demos/Examples/NodeView/index.vue rename to docs/src/demos/Examples/DragHandle/index.vue index 94910bf6..24ffb012 100644 --- a/docs/src/demos/Examples/NodeView/index.vue +++ b/docs/src/demos/Examples/DragHandle/index.vue @@ -7,11 +7,11 @@ - - diff --git a/docs/src/demos/Examples/NodeView/Component.vue b/docs/src/demos/Examples/NodeView/Component.vue deleted file mode 100644 index dd3c814f..00000000 --- a/docs/src/demos/Examples/NodeView/Component.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - diff --git a/docs/src/demos/Examples/VModel/index.vue b/docs/src/demos/Examples/VModel/index.vue index 74fe1f07..9b173776 100644 --- a/docs/src/demos/Examples/VModel/index.vue +++ b/docs/src/demos/Examples/VModel/index.vue @@ -25,7 +25,7 @@ export default { } -