A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/litingyes/vue-markdown below:

litingyes/vue-markdown: The vue component for render MarkDown string

Vue Markdown

The vue component for render Markdown string

This is a Vue.js component focused on Markdown string rendering, which is based on mdast-util-to-vnode to parse Markdown string and render by Vue.js.

npm install vue-markdown-x
<script setup>
import { ref } from 'vue'
import { VueMarkdown } from 'vue-markdown-x'

const mdStr = ref('')
</script>

<template>
  <VueMarkdown :md="mdStr" />
</template>

Markdown string to render.

// default: ''
type md = string

Customize how nodes are rendered.

type ComponentReturn = Component | [Component, Record<string, any> | undefined]

// default: undefined
type components = Partial<Record<Nodes['type'], ComponentReturn |
  ((node: Node) => ComponentReturn)>>

options of shiki for render code block.

interface shiki {
  // default: { light: catppuccinLatte, dark: catppuccinMocha }
  themes?: Record<string, ThemeRegistration>

  // default: [css,html,javascript,json,markdown,typescript,vue]
  langs?: LanguageRegistration[][]
}
VueMarkdown Css Variables
:root {
  /* basic font-size, and heading's font-size is scaled based on this value. */
  --vue-markdown-font-size: 16px;

  /* font-weight for heading */
  --vue-markdown-heading-font-weight: 600;
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4