feat(new tool): Markdown Editor

Fix part of #424 and #538
This commit is contained in:
sharevb 2024-04-28 12:35:52 +02:00
parent cb5b462e11
commit a99dae7f17
6 changed files with 638 additions and 17 deletions

View file

@ -0,0 +1,27 @@
<script setup lang="ts">
import type { Themes } from 'md-editor-v3';
import { MdEditor } from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
import { useStyleStore } from '@/stores/style.store';
const theme = ref<Themes>('light');
const styleStore = useStyleStore();
watch(
() => styleStore.isDarkTheme,
isDarkTheme => theme.value = isDarkTheme ? 'dark' : 'light',
{ immediate: true },
);
const markdown = ref('Sample _formatted_ *text*');
</script>
<template>
<div>
<MdEditor
v-model="markdown"
:theme="theme"
language="en-US"
/>
</div>
</template>