rename package folders

This commit is contained in:
Philipp Kühn
2020-03-30 10:42:59 +02:00
parent 18c5164af9
commit 14421a11fa
35 changed files with 2 additions and 2 deletions

1
packages/vue/index.ts Normal file
View File

@@ -0,0 +1 @@
export { default as EditorContent } from './src/components/EditorContent'

17
packages/vue/package.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "@tiptap/vue",
"version": "1.0.0",
"source": "index.ts",
"main": "dist/tiptap-vue.js",
"umd:main": "dist/tiptap-vue.umd.js",
"module": "dist/tiptap-vue.mjs",
"unpkg": "dist/tiptap-vue.js",
"jsdelivr": "dist/tiptap-vue.js",
"files": [
"src",
"dist"
],
"peerDependencies": {
"vue": "2.x"
}
}

View File

@@ -0,0 +1,32 @@
import Vue from 'vue'
export default Vue.extend({
props: {
editor: {
default: null,
type: Object,
},
},
watch: {
editor: {
immediate: true,
handler(editor) {
if (editor && editor.element) {
this.$nextTick(() => {
this.$el.appendChild(editor.element.firstChild)
// editor.setParentComponent(this)
})
}
},
},
},
render(createElement) {
return createElement('div')
},
beforeDestroy() {
this.editor.element = this.$el
},
})