fix extension manager
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
|
||||
@@ -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, that’s it.</p>',
|
||||
extensions: [
|
||||
new Document(),
|
||||
new Paragraph(),
|
||||
new Text(),
|
||||
Document(),
|
||||
Paragraph(),
|
||||
Text(),
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ export default {
|
||||
this.editor = new Editor({
|
||||
content: '<p>I’m 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(),
|
||||
],
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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 isn’t bold.</p>
|
||||
|
||||
@@ -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 isn’t code.</p>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 isn’t italic.</p>
|
||||
|
||||
@@ -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(),
|
||||
],
|
||||
})
|
||||
},
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
return {
|
||||
editor: new Editor({
|
||||
extensions: [
|
||||
new Blockquote(),
|
||||
Blockquote(),
|
||||
],
|
||||
content: `
|
||||
<blockquote>
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
return {
|
||||
editor: new Editor({
|
||||
extensions: [
|
||||
new BulletList(),
|
||||
BulletList(),
|
||||
],
|
||||
content: `
|
||||
<ul>
|
||||
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
return {
|
||||
editor: new Editor({
|
||||
extensions: [
|
||||
new Heading({
|
||||
Heading({
|
||||
levels: [1, 2],
|
||||
}),
|
||||
],
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
return {
|
||||
editor: new Editor({
|
||||
extensions: [
|
||||
new HorizontalRule(),
|
||||
HorizontalRule(),
|
||||
],
|
||||
content: `
|
||||
<p>Some text.</p>
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
return {
|
||||
editor: new Editor({
|
||||
extensions: [
|
||||
new OrderedList(),
|
||||
OrderedList(),
|
||||
],
|
||||
content: `
|
||||
<ol>
|
||||
|
||||
@@ -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: ''
|
||||
}),
|
||||
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
return {
|
||||
editor: new Editor({
|
||||
extensions: [
|
||||
new Strike(),
|
||||
Strike(),
|
||||
],
|
||||
content: `
|
||||
<p><s>That's strikethrough.</s></p>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
return {
|
||||
editor: new Editor({
|
||||
extensions: [
|
||||
new Underline(),
|
||||
Underline(),
|
||||
],
|
||||
content: `
|
||||
<p><u>This is underlined.</u></p>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user