tiptap/examples/Components/Routes/Title/Title.js

20 lines
260 B
JavaScript
Raw Normal View History

2019-06-22 04:00:42 +08:00
import { Node } from 'tiptap'
export default class Title extends Node {
get name() {
return 'title'
}
get schema() {
return {
content: 'inline*',
parseDOM: [{
tag: 'h1',
}],
toDOM: () => ['h1', 0],
}
}
}