mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-12 16:59:01 +08:00
rename all extensions (drop suffix)
This commit is contained in:
parent
787892dd4c
commit
6b03315e59
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Node } from 'tiptap'
|
||||
|
||||
export default class IframeNode extends Node {
|
||||
export default class Iframe extends Node {
|
||||
|
||||
get name() {
|
||||
return 'iframe'
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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.
|
||||
|
@ -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>
|
||||
|
@ -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',
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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'
|
||||
|
@ -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">
|
||||
|
@ -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>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Extension } from 'tiptap'
|
||||
import { history, undo, redo } from 'prosemirror-history'
|
||||
|
||||
export default class HistoryExtension extends Extension {
|
||||
export default class History extends Extension {
|
||||
|
||||
get name() {
|
||||
return 'history'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Extension, Plugin } from 'tiptap'
|
||||
import { Decoration, DecorationSet } from 'prosemirror-view'
|
||||
|
||||
export default class PlaceholderExtension extends Extension {
|
||||
export default class Placeholder extends Extension {
|
||||
|
||||
get name() {
|
||||
return 'placeholder'
|
||||
|
@ -1,24 +1,24 @@
|
||||
export { default as BlockquoteNode } from './nodes/Blockquote'
|
||||
export { default as BulletListNode } from './nodes/BulletList'
|
||||
export { default as CodeBlockNode } from './nodes/CodeBlock'
|
||||
export { default as CodeBlockHighlightNode } from './nodes/CodeBlockHighlight'
|
||||
export { default as HardBreakNode } from './nodes/HardBreak'
|
||||
export { default as HeadingNode } from './nodes/Heading'
|
||||
export { default as ImageNode } from './nodes/Image'
|
||||
export { default as ListItemNode } from './nodes/ListItem'
|
||||
export { default as MentionNode } from './nodes/Mention'
|
||||
export { default as OrderedListNode } from './nodes/OrderedList'
|
||||
export { default as TodoItemNode } from './nodes/TodoItem'
|
||||
export { default as TodoListNode } from './nodes/TodoList'
|
||||
export { default as Blockquote } from './nodes/Blockquote'
|
||||
export { default as BulletList } from './nodes/BulletList'
|
||||
export { default as CodeBlock } from './nodes/CodeBlock'
|
||||
export { default as CodeBlockHighlight } from './nodes/CodeBlockHighlight'
|
||||
export { default as HardBreak } from './nodes/HardBreak'
|
||||
export { default as Heading } from './nodes/Heading'
|
||||
export { default as Image } from './nodes/Image'
|
||||
export { default as ListItem } from './nodes/ListItem'
|
||||
export { default as Mention } from './nodes/Mention'
|
||||
export { default as OrderedList } from './nodes/OrderedList'
|
||||
export { default as TodoItem } from './nodes/TodoItem'
|
||||
export { default as TodoList } from './nodes/TodoList'
|
||||
|
||||
export { default as BoldMark } from './marks/Bold'
|
||||
export { default as CodeMark } from './marks/Code'
|
||||
export { default as ItalicMark } from './marks/Italic'
|
||||
export { default as LinkMark } from './marks/Link'
|
||||
export { default as StrikeMark } from './marks/Strike'
|
||||
export { default as UnderlineMark } from './marks/Underline'
|
||||
export { default as Bold } from './marks/Bold'
|
||||
export { default as Code } from './marks/Code'
|
||||
export { default as Italic } from './marks/Italic'
|
||||
export { default as Link } from './marks/Link'
|
||||
export { default as Strike } from './marks/Strike'
|
||||
export { default as Underline } from './marks/Underline'
|
||||
|
||||
export { default as HistoryExtension } from './extensions/History'
|
||||
export { default as PlaceholderExtension } from './extensions/Placeholder'
|
||||
export { default as History } from './extensions/History'
|
||||
export { default as Placeholder } from './extensions/Placeholder'
|
||||
|
||||
export { default as SuggestionsPlugin } from './plugins/Suggestions'
|
||||
export { default as Suggestions } from './plugins/Suggestions'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Mark } from 'tiptap'
|
||||
import { toggleMark, markInputRule } from 'tiptap-commands'
|
||||
|
||||
export default class BoldMark extends Mark {
|
||||
export default class Bold extends Mark {
|
||||
|
||||
get name() {
|
||||
return 'bold'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Mark } from 'tiptap'
|
||||
import { toggleMark, markInputRule } from 'tiptap-commands'
|
||||
|
||||
export default class CodeMark extends Mark {
|
||||
export default class Code extends Mark {
|
||||
|
||||
get name() {
|
||||
return 'code'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Mark } from 'tiptap'
|
||||
import { toggleMark, markInputRule } from 'tiptap-commands'
|
||||
|
||||
export default class ItalicMark extends Mark {
|
||||
export default class Italic extends Mark {
|
||||
|
||||
get name() {
|
||||
return 'italic'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Mark } from 'tiptap'
|
||||
import { updateMark, removeMark } from 'tiptap-commands'
|
||||
|
||||
export default class LinkMark extends Mark {
|
||||
export default class Link extends Mark {
|
||||
|
||||
get name() {
|
||||
return 'link'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Mark } from 'tiptap'
|
||||
import { toggleMark, markInputRule } from 'tiptap-commands'
|
||||
|
||||
export default class StrikeMark extends Mark {
|
||||
export default class Strike extends Mark {
|
||||
|
||||
get name() {
|
||||
return 'strike'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Mark } from 'tiptap'
|
||||
import { toggleMark } from 'tiptap-commands'
|
||||
|
||||
export default class UnderlineMark extends Mark {
|
||||
export default class Underline extends Mark {
|
||||
|
||||
get name() {
|
||||
return 'underline'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { wrappingInputRule, toggleWrap } from 'tiptap-commands'
|
||||
|
||||
export default class BlockquoteNode extends Node {
|
||||
export default class Blockquote extends Node {
|
||||
|
||||
get name() {
|
||||
return 'blockquote'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { wrappingInputRule, toggleList } from 'tiptap-commands'
|
||||
|
||||
export default class BulletNode extends Node {
|
||||
export default class Bullet extends Node {
|
||||
|
||||
get name() {
|
||||
return 'bullet_list'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { toggleBlockType, setBlockType, textblockTypeInputRule } from 'tiptap-commands'
|
||||
|
||||
export default class CodeBlockNode extends Node {
|
||||
export default class CodeBlock extends Node {
|
||||
|
||||
get name() {
|
||||
return 'code_block'
|
||||
|
@ -61,7 +61,7 @@ function getDecorations(doc) {
|
||||
return DecorationSet.create(doc, decorations)
|
||||
}
|
||||
|
||||
export default class CodeBlockHighlightNode extends Node {
|
||||
export default class CodeBlockHighlight extends Node {
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { chainCommands, exitCode } from 'tiptap-commands'
|
||||
|
||||
export default class HardBreakNode extends Node {
|
||||
export default class HardBreak extends Node {
|
||||
|
||||
get name() {
|
||||
return 'hard_break'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { setBlockType, textblockTypeInputRule, toggleBlockType } from 'tiptap-commands'
|
||||
|
||||
export default class HeadingNode extends Node {
|
||||
export default class Heading extends Node {
|
||||
|
||||
get name() {
|
||||
return 'heading'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Node, Plugin } from 'tiptap'
|
||||
|
||||
export default class ImageNode extends Node {
|
||||
export default class Image extends Node {
|
||||
|
||||
get name() {
|
||||
return 'image'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { splitListItem, liftListItem, sinkListItem } from 'tiptap-commands'
|
||||
|
||||
export default class ListItemNode extends Node {
|
||||
export default class ListItem extends Node {
|
||||
|
||||
get name() {
|
||||
return 'list_item'
|
||||
|
@ -2,7 +2,7 @@ import { Node } from 'tiptap'
|
||||
import { replaceText } from 'tiptap-commands'
|
||||
import SuggestionsPlugin from '../plugins/Suggestions'
|
||||
|
||||
export default class MentionNode extends Node {
|
||||
export default class Mention extends Node {
|
||||
|
||||
get name() {
|
||||
return 'mention'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { wrappingInputRule, toggleList } from 'tiptap-commands'
|
||||
|
||||
export default class OrderedListNode extends Node {
|
||||
export default class OrderedList extends Node {
|
||||
|
||||
get name() {
|
||||
return 'ordered_list'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { splitToDefaultListItem, liftListItem } from 'tiptap-commands'
|
||||
|
||||
export default class TodoItemNode extends Node {
|
||||
export default class TodoItem extends Node {
|
||||
|
||||
get name() {
|
||||
return 'todo_item'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Node } from 'tiptap'
|
||||
import { wrapInList, wrappingInputRule } from 'tiptap-commands'
|
||||
|
||||
export default class TodoListNode extends Node {
|
||||
export default class TodoList extends Node {
|
||||
|
||||
get name() {
|
||||
return 'todo_list'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Node from '../Utils/Node'
|
||||
|
||||
export default class DocNode extends Node {
|
||||
export default class Doc extends Node {
|
||||
|
||||
get name() {
|
||||
return 'doc'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { setBlockType } from 'tiptap-commands'
|
||||
import Node from '../Utils/Node'
|
||||
|
||||
export default class ParagraphNode extends Node {
|
||||
export default class Paragraph extends Node {
|
||||
|
||||
get name() {
|
||||
return 'paragraph'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Node from '../Utils/Node'
|
||||
|
||||
export default class TextNode extends Node {
|
||||
export default class Text extends Node {
|
||||
|
||||
get name() {
|
||||
return 'text'
|
||||
|
Loading…
Reference in New Issue
Block a user