JSPM

  • Created
  • Published
  • Downloads 6733
  • Score
    100M100P100Q123565F

Package Exports

  • vue3-markdown
  • vue3-markdown/dist/style.css

Readme

Vue 3 markodwn

This is a vue component of markdown editor based on micromark development, which mainly implements the following features.

  1. multi-language support
  2. black and white theme preview
  3. support KaTex formula input
  4. ustom image upload interface
  5. GFM style

Preview

demo

live demo

Installation

npm install vue3-markdown

Usage

<script setup>
import { ref } from 'vue'
import { VMarkdownEditor } from 'vue3-markdown'
import 'vue3-markdown/dist/style.css'

const content = ref('')
const handleUpload = (file) => {
  console.log(file)
  return 'https://i.postimg.cc/52qCzTVw/pngwing-com.png'
}
</script>

<template>
  <VMarkdownEditor
    v-model="content"
    locale="en"
    :upload-action="handleUpload"
  />
</template>