import type { Ref } from 'vue'; import type { InlineFormat, MarkdownTemplate } from '../../types'; /** * Utilize the markdown editor actions. * @param {Ref} textareaRef The textarea Vue template ref * @param {Ref} rawMarkdown A Vue ref containing the raw markdown content from the textarea. */ export default function useMarkdownActions(textareaRef: Ref, rawMarkdown: Ref): { selectedText: { start: number; end: number; text: string; }; getTextSelection: () => void; toggleInlineFormatting: (format: InlineFormat) => Promise; toggleTab: (action: "add" | "remove", tabSize: number) => Promise; insertMarkdownTemplate: (template: MarkdownTemplate) => Promise; insertLink: () => Promise; insertNewLine: () => Promise; insertImage: () => Promise; };