remove some unused extensions from demo examples

This commit is contained in:
Philipp Kühn
2018-09-06 23:18:30 +02:00
parent 35fb23141a
commit f63f300e38
5 changed files with 4 additions and 89 deletions

View File

@@ -18,49 +18,34 @@
</template> </template>
<script> <script>
import Icon from 'Components/Icon'
import { Editor } from 'tiptap' import { Editor } from 'tiptap'
import { import {
BlockquoteNode,
BulletListNode,
CodeBlockHighlightNode, CodeBlockHighlightNode,
HardBreakNode, HardBreakNode,
HeadingNode, HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark, BoldMark,
CodeMark, CodeMark,
ItalicMark, ItalicMark,
LinkMark,
HistoryExtension,
} from 'tiptap-extensions' } from 'tiptap-extensions'
import { javascript, css } from './examples' import {
javascript,
css,
} from './examples'
export default { export default {
components: { components: {
Editor, Editor,
Icon,
}, },
data() { data() {
return { return {
extensions: [ extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockHighlightNode(), new CodeBlockHighlightNode(),
new HardBreakNode(), new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }), new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(), new BoldMark(),
new CodeMark(), new CodeMark(),
new ItalicMark(), new ItalicMark(),
new LinkMark(),
new HistoryExtension(),
], ],
javascript, javascript,
css, css,

View File

@@ -17,22 +17,12 @@
</template> </template>
<script> <script>
import Icon from 'Components/Icon'
import { Editor } from 'tiptap' import { Editor } from 'tiptap'
import { import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode, HardBreakNode,
HeadingNode, HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark, BoldMark,
CodeMark,
ItalicMark, ItalicMark,
LinkMark,
HistoryExtension, HistoryExtension,
} from 'tiptap-extensions' } from 'tiptap-extensions'
import IframeNode from './Iframe.js' import IframeNode from './Iframe.js'
@@ -40,24 +30,14 @@ import IframeNode from './Iframe.js'
export default { export default {
components: { components: {
Editor, Editor,
Icon,
}, },
data() { data() {
return { return {
extensions: [ extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(), new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }), new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(), new BoldMark(),
new CodeMark(),
new ItalicMark(), new ItalicMark(),
new LinkMark(),
new HistoryExtension(), new HistoryExtension(),
// custom extension // custom extension
new IframeNode(), new IframeNode(),

View File

@@ -17,49 +17,29 @@
</template> </template>
<script> <script>
import Icon from 'Components/Icon'
import { Editor } from 'tiptap' import { Editor } from 'tiptap'
import { import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode, HardBreakNode,
HeadingNode, HeadingNode,
ImageNode, ImageNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark, BoldMark,
CodeMark, CodeMark,
ItalicMark, ItalicMark,
LinkMark,
HistoryExtension,
} from 'tiptap-extensions' } from 'tiptap-extensions'
export default { export default {
components: { components: {
Editor, Editor,
Icon,
}, },
data() { data() {
return { return {
extensions: [ extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(), new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }), new HeadingNode({ maxLevel: 3 }),
new ImageNode(), new ImageNode(),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(), new BoldMark(),
new CodeMark(), new CodeMark(),
new ItalicMark(), new ItalicMark(),
new LinkMark(),
new HistoryExtension(),
], ],
} }
}, },

View File

@@ -16,47 +16,29 @@
</template> </template>
<script> <script>
import Icon from 'Components/Icon'
import { Editor } from 'tiptap' import { Editor } from 'tiptap'
import { import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode, HardBreakNode,
HeadingNode, HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark, BoldMark,
CodeMark, CodeMark,
ItalicMark, ItalicMark,
LinkMark, LinkMark,
HistoryExtension,
} from 'tiptap-extensions' } from 'tiptap-extensions'
export default { export default {
components: { components: {
Editor, Editor,
Icon,
}, },
data() { data() {
return { return {
extensions: [ extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(), new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }), new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(), new BoldMark(),
new CodeMark(), new CodeMark(),
new ItalicMark(), new ItalicMark(),
new LinkMark(), new LinkMark(),
new HistoryExtension(),
], ],
} }
}, },

View File

@@ -71,20 +71,14 @@
import Icon from 'Components/Icon' import Icon from 'Components/Icon'
import { Editor } from 'tiptap' import { Editor } from 'tiptap'
import { import {
BlockquoteNode,
BulletListNode,
CodeBlockNode, CodeBlockNode,
HardBreakNode, HardBreakNode,
HeadingNode, HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode, TodoItemNode,
TodoListNode, TodoListNode,
BoldMark, BoldMark,
CodeMark, CodeMark,
ItalicMark, ItalicMark,
LinkMark,
HistoryExtension,
} from 'tiptap-extensions' } from 'tiptap-extensions'
export default { export default {
@@ -96,20 +90,14 @@ export default {
return { return {
customProp: 2, customProp: 2,
extensions: [ extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(), new CodeBlockNode(),
new HardBreakNode(), new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }), new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(), new TodoItemNode(),
new TodoListNode(), new TodoListNode(),
new BoldMark(), new BoldMark(),
new CodeMark(), new CodeMark(),
new ItalicMark(), new ItalicMark(),
new LinkMark(),
new HistoryExtension(),
], ],
} }
}, },