Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Support for embedded html #314

Open
ruralcoder opened this issue Dec 8, 2021 · 1 comment
Open

Support for embedded html #314

ruralcoder opened this issue Dec 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ruralcoder
Copy link

Is your feature request related to a problem? Please describe.
In vue2.x i used some other markdown library and it had a nice feature, to embed real HTML inside it and it will render it properly

<nav aria-label="breadcrumb" class=" mb-4">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/legal">Legal</a></li>
        <li class="breadcrumb-item active" aria-current="page">My Data</li>
    </ol>
</nav>

# My Data
...some real markup

This is not supported out of the box. But is there a config I missed?
I am using markdown for localization. Different .md file per language, so having the bread crumb there worked great for me.

Describe the solution you'd like
Do you currently support this?

Describe alternatives you've considered

Additional context

@ruralcoder ruralcoder added the enhancement New feature or request label Dec 8, 2021
@mrenow
Copy link

mrenow commented Jun 7, 2022

Hi there! Dont know if this is still relevant, but a plugin exists that does this and it works nicely for my use cases.

// script setup
import Markdown from 'vue3-markdown-it'
import MarkdownHTML from 'markdown-it-html'

const props = defineProps<{
    source: string
}>()
<template>
    <Markdown
      :source="source"
      :html="true"
      :plugins="[
        {
          plugin: MarkdownHTML,
          options:{
            re: /<html>!([^]*?)<\/html>/
          }
        }
      ]"
    />
</template>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants