Files
tiptap/packages/vue-2/src/NodeViewContent.ts
Philipp Kühn 0e1d6d41fe refactoring
2021-05-04 11:03:11 +02:00

28 lines
484 B
TypeScript

import Vue, { Component } from 'vue'
export interface NodeViewContentInterface extends Vue {
as: string,
}
export const NodeViewContent: Component = {
props: {
as: {
type: String,
default: 'div',
},
},
render(this: NodeViewContentInterface, createElement) {
return createElement(
this.as, {
style: {
whiteSpace: 'pre-wrap',
},
attrs: {
'data-node-view-content': '',
},
},
)
},
}