Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ This plugin provides a `highlightjs` component for use in your Vue.js 3 applicat

Note: For Vue.js version 2 support see the [1-stable](https://github.com/highlightjs/vue-plugin/tree/1-stable) branch here on GitHub. Version 1.x.x is compatible with Vue.js v2; version 2.x.x with Vue.js v3.

## Using script setup

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

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

## Using the pre-built libraries

```html
Expand Down
2 changes: 2 additions & 0 deletions src/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ const plugin: Plugin & { component: typeof component } = {
}

export default plugin

export const HighlightJs = component