diff --git a/examples/Components/Routes/Title/Doc.js b/examples/Components/Routes/Title/Doc.js new file mode 100644 index 00000000..31366924 --- /dev/null +++ b/examples/Components/Routes/Title/Doc.js @@ -0,0 +1,11 @@ +import { Doc } from 'tiptap' + +export default class CustomDoc extends Doc { + + get schema() { + return { + content: 'title block+', + } + } + +} diff --git a/examples/Components/Routes/Title/Title.js b/examples/Components/Routes/Title/Title.js new file mode 100644 index 00000000..22d54ae4 --- /dev/null +++ b/examples/Components/Routes/Title/Title.js @@ -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], + } + } + +} diff --git a/examples/Components/Routes/Title/index.vue b/examples/Components/Routes/Title/index.vue new file mode 100644 index 00000000..e274f72f --- /dev/null +++ b/examples/Components/Routes/Title/index.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/examples/Components/Subnavigation/index.vue b/examples/Components/Subnavigation/index.vue index 42485d84..cf93c1c0 100644 --- a/examples/Components/Subnavigation/index.vue +++ b/examples/Components/Subnavigation/index.vue @@ -51,6 +51,9 @@ Collaboration + + Title + Export HTML or JSON diff --git a/examples/main.js b/examples/main.js index 41db7748..747c8372 100644 --- a/examples/main.js +++ b/examples/main.js @@ -130,6 +130,13 @@ const routes = [ githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Collaboration', }, }, + { + path: '/title', + component: () => import('Components/Routes/Title'), + meta: { + githubUrl: 'https://github.com/scrumpy/tiptap/tree/master/examples/Components/Routes/Title', + }, + }, { path: '/export', component: () => import('Components/Routes/Export'),