feat: support more syntaxes in editor

pull/112/head
三咲智子 2022-11-26 10:01:50 +08:00
rodzic 2b7e1dbfc0
commit da64d008a1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 69992F2250DFD93E
2 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -37,7 +37,7 @@ export function getDefaultDraft({
}
}
export function getParamsFromStatus(status: Status) {
export function getParamsFromStatus(status: Status): Draft['params'] {
return {
status: status.content,
mediaIds: status.mediaAttachments.map(att => att.id),

Wyświetl plik

@ -6,6 +6,10 @@ import Text from '@tiptap/extension-text'
import Mention from '@tiptap/extension-mention'
import CodeBlock from '@tiptap/extension-code-block'
import CharacterCount from '@tiptap/extension-character-count'
import HardBreak from '@tiptap/extension-hard-break'
import Bold from '@tiptap/extension-bold'
import Italic from '@tiptap/extension-italic'
import Code from '@tiptap/extension-code'
import { Plugin } from 'prosemirror-state'
import type { Ref } from 'vue'
@ -32,6 +36,10 @@ export function useTiptap(options: UseTiptapOptions) {
extensions: [
Document,
Paragraph,
HardBreak,
Bold,
Italic,
Code,
Text,
Mention.configure({
suggestion: MentionSuggestion,