Merge branch 'master' into v1.0

# Conflicts:
#	examples/Components/Routes/Basic/index.vue
#	examples/Components/Routes/Export/index.vue
#	examples/Components/Routes/MarkdownShortcuts/index.vue
#	examples/Components/Routes/Suggestions/index.vue
This commit is contained in:
Philipp Kühn
2018-11-08 21:41:33 +01:00
12 changed files with 57 additions and 51 deletions

View File

@@ -133,12 +133,12 @@ import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
BulletList,
ListItem,
TodoItem,
TodoList,
Bold,

View File

@@ -115,12 +115,12 @@ import Icon from 'Components/Icon'
import { Editor, EditorContent, MenuBar } from 'tiptap'
import {
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
BulletList,
ListItem,
TodoItem,
TodoList,
Bold,

View File

@@ -9,12 +9,12 @@ import Icon from 'Components/Icon'
import { Editor, EditorContent } from 'tiptap'
import {
Blockquote,
BulletList,
CodeBlock,
HardBreak,
Heading,
ListItem,
OrderedList,
BulletList,
ListItem,
TodoItem,
TodoList,
Bold,

View File

@@ -52,14 +52,16 @@ export default {
new Heading({ levels: [1, 2, 3] }),
new Mention({
// a list of all suggested items
items: [
items: () => [
{ id: 1, name: 'Philipp Kühn' },
{ id: 2, name: 'Hans Pagel' },
{ id: 3, name: 'Kris Siepert' },
{ id: 4, name: 'Justin Schueler' },
],
// is called when a suggestion starts
onEnter: ({ items, query, range, command, virtualNode }) => {
onEnter: ({
items, query, range, command, virtualNode,
}) => {
this.query = query
this.filteredUsers = items
this.suggestionRange = range
@@ -70,7 +72,9 @@ export default {
this.insertMention = command
},
// is called when a suggestion has changed
onChange: ({ items, query, range, virtualNode }) => {
onChange: ({
items, query, range, virtualNode,
}) => {
this.query = query
this.filteredUsers = items
this.suggestionRange = range