1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 00:19:59 +00:00

feat: support more syntaxes in editor

This commit is contained in:
三咲智子 2022-11-26 10:01:50 +08:00
parent 2b7e1dbfc0
commit da64d008a1
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
2 changed files with 9 additions and 1 deletions

View file

@ -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),

View file

@ -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,