Skip to content

Create slot inside md #443

@alex-eri

Description

@alex-eri

How to create slot in md? something like this:

<template>
<MDC :value="md"  tag="article" >

<SomeDynamicContent  v-if=data/>

<LoginForm v-else @submit="onLogin" />

</MDC>
</template>

<script setup lang="ts">
const md = `

Hello MDC

::slot
::

Footer
`

const {data} = await useAsyncData(async ()=>{ return 123})

function onLogin(event) {
// do login
}

</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions