add title example
This commit is contained in:
19
examples/Components/Routes/Title/Title.js
Normal file
19
examples/Components/Routes/Title/Title.js
Normal file
@@ -0,0 +1,19 @@
|
||||
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],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user