Skip to content

Export component to allow usage without registering as plugin#46

Open
moander wants to merge 2 commits into
highlightjs:mainfrom
moander:main
Open

Export component to allow usage without registering as plugin#46
moander wants to merge 2 commits into
highlightjs:mainfrom
moander:main

Conversation

@moander

@moander moander commented Nov 24, 2023

Copy link
Copy Markdown

I also added a script setup example using the component.

@moander

moander commented Nov 24, 2023

Copy link
Copy Markdown
Author

I see now that it is already documented how to do that.. But script setup with that additional export saves you a few lines :-)

<template>
    <highlight-js autodetect code="function() {}" />
</template>

<script setup>
import 'highlight.js/lib/common';
import { HighlightJs } from "@highlightjs/vue-plugin";
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant