fix extension manager

This commit is contained in:
Philipp Kühn
2020-09-09 10:58:10 +02:00
parent bbccfa43e8
commit a812dd47be
22 changed files with 1099 additions and 1061 deletions

View File

@@ -31,16 +31,16 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
new Document(),
new History(),
new Paragraph(),
new Text(),
new Bold(),
new Italic(),
new Code(),
new CodeBlock(),
new Heading(),
new Focus({
Document(),
History(),
Paragraph(),
Text(),
Bold(),
Italic(),
Code(),
CodeBlock(),
Heading(),
Focus({
className: 'has-focus',
nested: true,
}),

View File

@@ -24,9 +24,9 @@ export default {
this.editor = new Editor({
content: '<p>This is a radically reduced version of tiptap for minimalisits. It has only support for a document, paragraphs and text, thats it.</p>',
extensions: [
new Document(),
new Paragraph(),
new Text(),
Document(),
Paragraph(),
Text(),
],
})

View File

@@ -26,10 +26,10 @@ export default {
this.editor = new Editor({
content: '<p>Im running tiptap with Vue.js. This demo is interactive, try to edit the text.</p>',
extensions: [
new Document(),
new Paragraph(),
new Text(),
new Bold(),
Document(),
Paragraph(),
Text(),
Bold(),
],
})
},

View File

@@ -30,10 +30,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
new Document(),
new Paragraph(),
new Text(),
new Bold(),
Document(),
Paragraph(),
Text(),
Bold(),
],
content: `
<p>This isnt bold.</p>

View File

@@ -30,10 +30,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
new Document(),
new Paragraph(),
new Text(),
new Code(),
Document(),
Paragraph(),
Text(),
Code(),
],
content: `
<p>This isnt code.</p>

View File

@@ -33,10 +33,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
new Document(),
new Paragraph(),
new Text(),
new History(),
Document(),
Paragraph(),
Text(),
History(),
],
content: `
<p>Edit this text and press undo to test this extension.</p>

View File

@@ -30,10 +30,10 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
new Document(),
new Paragraph(),
new Text(),
new Italic(),
Document(),
Paragraph(),
Text(),
Italic(),
],
content: `
<p>This isnt italic.</p>

View File

@@ -55,15 +55,15 @@ export default {
this.editor = new Editor({
content: '<h2>Hey there!</h2><p>This editor is based on Prosemirror, fully extendable and renderless. You can easily add custom nodes as Vue components.</p>',
extensions: [
new Document(),
new Paragraph(),
new Text(),
new CodeBlock(),
new History(),
new Bold(),
new Italic(),
new Code(),
new Heading(),
Document(),
Paragraph(),
Text(),
CodeBlock(),
History(),
Bold(),
Italic(),
Code(),
Heading(),
],
})
},

View File

@@ -39,7 +39,7 @@ export default {
return {
editor: new Editor({
extensions: [
new Blockquote(),
Blockquote(),
],
content: `
<blockquote>

View File

@@ -43,7 +43,7 @@ export default {
return {
editor: new Editor({
extensions: [
new BulletList(),
BulletList(),
],
content: `
<ul>

View File

@@ -51,7 +51,7 @@ export default {
return {
editor: new Editor({
extensions: [
new Heading({
Heading({
levels: [1, 2],
}),
],

View File

@@ -39,7 +39,7 @@ export default {
return {
editor: new Editor({
extensions: [
new HorizontalRule(),
HorizontalRule(),
],
content: `
<p>Some text.</p>

View File

@@ -43,7 +43,7 @@ export default {
return {
editor: new Editor({
extensions: [
new OrderedList(),
OrderedList(),
],
content: `
<ol>

View File

@@ -66,10 +66,10 @@ You have to include all table extensions (`TableHeader`, `TableCell` & `TableRow
return {
editor: new Editor({
extensions: [
new Table(),
new TableCell(),
new TableHeader(),
new TableRow(),
Table(),
TableCell(),
TableHeader(),
TableRow(),
],
content: ''
}),

View File

@@ -40,7 +40,7 @@ export default {
return {
editor: new Editor({
extensions: [
new Strike(),
Strike(),
],
content: `
<p><s>That's strikethrough.</s></p>

View File

@@ -43,10 +43,10 @@ export default {
return {
editor: new Editor({
extensions: [
new TodoItem({
TodoItem({
nested: true,
}),
new TodoList(),
TodoList(),
],
content: `
<ul data-type="todo_list">

View File

@@ -40,7 +40,7 @@ export default {
return {
editor: new Editor({
extensions: [
new Underline(),
Underline(),
],
content: `
<p><u>This is underlined.</u></p>

View File

@@ -2,7 +2,7 @@
## New features
* generate schema without initializing tiptap, to make SSR easier (e. g. `getSchema([new Doc(), new Paragraph()])`)
* generate schema without initializing tiptap, to make SSR easier (e. g. `getSchema([Doc(), Paragraph()])`)
## Requested features