rename all extensions (drop suffix)

This commit is contained in:
Philipp Kühn
2018-10-24 07:46:47 +02:00
parent 787892dd4c
commit 6b03315e59
41 changed files with 344 additions and 344 deletions

View File

@@ -118,22 +118,22 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode,
HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
StrikeMark,
UnderlineMark,
HistoryExtension,
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
TodoItem,
TodoList,
Bold,
Code,
Italic,
Link,
Strike,
Underline,
History,
} from 'tiptap-extensions'
export default {
@@ -146,22 +146,22 @@ export default {
return {
editor: new Editor({
extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new StrikeMark(),
new UnderlineMark(),
new HistoryExtension(),
new Blockquote(),
new BulletList(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new ListItem(),
new OrderedList(),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
new Link(),
new Strike(),
new Underline(),
new History(),
],
content: `
<h2>

View File

@@ -7,12 +7,12 @@
<script>
import { Editor, EditorContent } from 'tiptap'
import {
CodeBlockHighlightNode,
HardBreakNode,
HeadingNode,
BoldMark,
CodeMark,
ItalicMark,
CodeBlockHighlight,
HardBreak,
Heading,
Bold,
Code,
Italic,
} from 'tiptap-extensions'
import javascript from 'highlight.js/lib/languages/javascript'
@@ -32,17 +32,17 @@ export default {
return {
editor: new Editor({
extensions: [
new CodeBlockHighlightNode({
new CodeBlockHighlight({
languages: {
javascript,
css,
},
}),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new Bold(),
new Code(),
new Italic(),
],
content: `
<h2>

View File

@@ -1,6 +1,6 @@
import { Node } from 'tiptap'
export default class IframeNode extends Node {
export default class Iframe extends Node {
get name() {
return 'iframe'

View File

@@ -7,13 +7,13 @@
<script>
import { Editor, EditorContent } from 'tiptap'
import {
HardBreakNode,
HeadingNode,
BoldMark,
ItalicMark,
HistoryExtension,
HardBreak,
Heading,
Bold,
Italic,
History,
} from 'tiptap-extensions'
import IframeNode from './Iframe.js'
import Iframe from './Iframe.js'
export default {
components: {
@@ -23,13 +23,13 @@ export default {
return {
editor: new Editor({
extensions: [
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new BoldMark(),
new ItalicMark(),
new HistoryExtension(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new Bold(),
new Italic(),
new History(),
// custom extension
new IframeNode(),
new Iframe(),
],
content: `
<h2>

View File

@@ -114,20 +114,20 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode,
HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
HistoryExtension,
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
TodoItem,
TodoList,
Bold,
Code,
Italic,
Link,
History,
} from 'tiptap-extensions'
export default {
@@ -140,20 +140,20 @@ export default {
return {
editor: new Editor({
extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new HistoryExtension(),
new Blockquote(),
new BulletList(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new ListItem(),
new OrderedList(),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
new Link(),
new History(),
],
content: `
<h2>

View File

@@ -70,20 +70,20 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, FloatingMenu } from 'tiptap'
import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode,
HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
HistoryExtension,
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
TodoItem,
TodoList,
Bold,
Code,
Italic,
Link,
History,
} from 'tiptap-extensions'
export default {
@@ -96,20 +96,20 @@ export default {
return {
editor: new Editor({
extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new HistoryExtension(),
new Blockquote(),
new BulletList(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new ListItem(),
new OrderedList(),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
new Link(),
new History(),
],
content: `
<h2>

View File

@@ -120,22 +120,22 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode,
HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
StrikeMark,
UnderlineMark,
HistoryExtension,
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
TodoItem,
TodoList,
Bold,
Code,
Italic,
Link,
Strike,
Underline,
History,
} from 'tiptap-extensions'
export default {
@@ -148,22 +148,22 @@ export default {
return {
editor: new Editor({
extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new StrikeMark(),
new UnderlineMark(),
new HistoryExtension(),
new Blockquote(),
new BulletList(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new ListItem(),
new OrderedList(),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
new Link(),
new Strike(),
new Underline(),
new History(),
],
content: `
<h2>

View File

@@ -19,12 +19,12 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
HardBreakNode,
HeadingNode,
ImageNode,
BoldMark,
CodeMark,
ItalicMark,
HardBreak,
Heading,
Image,
Bold,
Code,
Italic,
} from 'tiptap-extensions'
export default {
@@ -37,12 +37,12 @@ export default {
return {
editor: new Editor({
extensions: [
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ImageNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new Image(),
new Bold(),
new Code(),
new Italic(),
],
content: `
<h2>

View File

@@ -32,20 +32,20 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBubble } from 'tiptap'
import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode,
HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
HistoryExtension,
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
TodoItem,
TodoList,
Bold,
Code,
Italic,
Link,
History,
} from 'tiptap-extensions'
export default {
@@ -58,20 +58,20 @@ export default {
return {
editor: new Editor({
extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new HistoryExtension(),
new Blockquote(),
new BulletList(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new ListItem(),
new OrderedList(),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
new Link(),
new History(),
],
content: `
<h2>

View File

@@ -8,20 +8,20 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent } from 'tiptap'
import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode,
HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
HistoryExtension,
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
TodoItem,
TodoList,
Bold,
Code,
Italic,
Link,
History,
} from 'tiptap-extensions'
export default {
@@ -33,24 +33,24 @@ export default {
return {
editor: new Editor({
extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new HistoryExtension(),
new Blockquote(),
new BulletList(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new ListItem(),
new OrderedList(),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
new Link(),
new History(),
],
content: `
<h2>
Markdown Shortcuts
down Shortcuts
</h2>
<p>
Start a new line and type <code>#</code> followed by a <code>space</code> and you will get an H1 headline.

View File

@@ -38,22 +38,22 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBubble } from 'tiptap'
import {
BlockquoteNode,
BulletListNode,
CodeBlockNode,
HardBreakNode,
HeadingNode,
ListItemNode,
OrderedListNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
StrikeMark,
UnderlineMark,
HistoryExtension,
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
TodoItem,
TodoList,
Bold,
Code,
Italic,
Link,
Strike,
Underline,
History,
} from 'tiptap-extensions'
export default {
@@ -66,22 +66,22 @@ export default {
return {
editor: new Editor({
extensions: [
new BlockquoteNode(),
new BulletListNode(),
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new ListItemNode(),
new OrderedListNode(),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new StrikeMark(),
new UnderlineMark(),
new HistoryExtension(),
new Blockquote(),
new BulletList(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new ListItem(),
new OrderedList(),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
new Link(),
new Strike(),
new Underline(),
new History(),
],
content: `
<h2>

View File

@@ -7,9 +7,9 @@
<script>
import { Editor, EditorContent } from 'tiptap'
import {
BulletListNode,
ListItemNode,
PlaceholderExtension,
BulletList,
ListItem,
Placeholder,
} from 'tiptap-extensions'
export default {
@@ -20,10 +20,10 @@ export default {
return {
editor: new Editor({
extensions: [
new BulletListNode(),
new ListItemNode(),
new PlaceholderExtension({
emptyNodeClass: 'is-empty',
new BulletList(),
new ListItem(),
new Placeholder({
emptyClass: 'is-empty',
}),
],
}),

View File

@@ -7,12 +7,12 @@
<script>
import { Editor, EditorContent } from 'tiptap'
import {
HardBreakNode,
HeadingNode,
BoldMark,
CodeMark,
ItalicMark,
LinkMark,
HardBreak,
Heading,
Bold,
Code,
Italic,
Link,
} from 'tiptap-extensions'
export default {
@@ -24,12 +24,12 @@ export default {
editor: new Editor({
editable: false,
extensions: [
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new LinkMark(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new Bold(),
new Code(),
new Italic(),
new Link(),
],
content: `
<h2>

View File

@@ -30,12 +30,12 @@ import Fuse from 'fuse.js'
import tippy from 'tippy.js'
import { Editor, EditorContent } from 'tiptap'
import {
HardBreakNode,
HeadingNode,
MentionNode,
CodeMark,
BoldMark,
ItalicMark,
HardBreak,
Heading,
Mention,
Code,
Bold,
Italic,
} from 'tiptap-extensions'
export default {
@@ -48,9 +48,9 @@ export default {
return {
editor: new Editor({
extensions: [
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new MentionNode({
new HardBreak(),
new Heading({ maxLevel: 3 }),
new Mention({
// a list of all suggested items
items: [
{ id: 1, name: 'Philipp Kühn' },
@@ -123,9 +123,9 @@ export default {
return fuse.search(query)
},
}),
new CodeMark(),
new BoldMark(),
new ItalicMark(),
new Code(),
new Bold(),
new Italic(),
],
content: `
<h2>

View File

@@ -1,7 +1,7 @@
import { setBlockType } from 'tiptap-commands'
import { Node } from 'tiptap'
export default class ParagraphNode extends Node {
export default class Paragraph extends Node {
get name() {
return 'paragraph'

View File

@@ -38,10 +38,10 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
HardBreakNode,
CodeMark,
HardBreak,
Code,
} from 'tiptap-extensions'
import ParagraphAlignmentNode from './Paragraph.js'
import ParagraphAlignment from './Paragraph.js'
export default {
components: {
@@ -53,9 +53,9 @@ export default {
return {
editor: new Editor({
extensions: [
new HardBreakNode(),
new CodeMark(),
new ParagraphAlignmentNode(),
new HardBreak(),
new Code(),
new ParagraphAlignment(),
],
content: `
<p style="text-align: left">

View File

@@ -46,14 +46,14 @@
import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
CodeBlockNode,
HardBreakNode,
HeadingNode,
TodoItemNode,
TodoListNode,
BoldMark,
CodeMark,
ItalicMark,
CodeBlock,
HardBreak,
Heading,
TodoItem,
TodoList,
Bold,
Code,
Italic,
} from 'tiptap-extensions'
export default {
@@ -66,14 +66,14 @@ export default {
return {
editor: new Editor({
extensions: [
new CodeBlockNode(),
new HardBreakNode(),
new HeadingNode({ maxLevel: 3 }),
new TodoItemNode(),
new TodoListNode(),
new BoldMark(),
new CodeMark(),
new ItalicMark(),
new CodeBlock(),
new HardBreak(),
new Heading({ maxLevel: 3 }),
new TodoItem(),
new TodoList(),
new Bold(),
new Code(),
new Italic(),
],
content: `
<h2>