feat(admin): integrate markdown editor for news creation

This commit replaces the basic textarea in the 'Add News' modal with a full-featured Markdown editor.

- Adds the `md-editor-v3` dependency.
- Implements the editor within a `ClientOnly` component for client-side rendering.
- Creates a Nuxt plugin to register the `MdEditor` component globally.
- Adjusts the modal to be fullscreen to provide a better user experience for content creation.
This commit is contained in:
xiaomai
2025-10-08 10:13:18 +08:00
parent 3254926c43
commit cc7b2a7398
4 changed files with 663 additions and 11 deletions

View File

@@ -0,0 +1,6 @@
import { MdEditor } from 'md-editor-v3'
import 'md-editor-v3/lib/style.css'
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component('MdEditor', MdEditor)
})