mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-24 17:47:50 +08:00
27 lines
452 B
TypeScript
27 lines
452 B
TypeScript
import { h, defineComponent } from 'vue'
|
|
|
|
export const NodeViewWrapper = defineComponent({
|
|
props: {
|
|
as: {
|
|
type: String,
|
|
default: 'div',
|
|
},
|
|
},
|
|
|
|
inject: ['onDragStart'],
|
|
|
|
render() {
|
|
return h(
|
|
this.as, {
|
|
style: {
|
|
whiteSpace: 'normal',
|
|
},
|
|
'data-node-view-wrapper': '',
|
|
// @ts-ignore
|
|
onDragStart: this.onDragStart,
|
|
},
|
|
this.$slots.default?.(),
|
|
)
|
|
},
|
|
})
|