Skip to content

Commit 05cae6e

Browse files
committed
script setup example
1 parent f8e792c commit 05cae6e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ This plugin provides a `highlightjs` component for use in your Vue.js 3 applicat
2424

2525
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.
2626

27+
## Using script setup
28+
29+
```html
30+
<template>
31+
<highlight-js autodetect code="function() {}" />
32+
</template>
33+
34+
<script setup>
35+
import 'highlight.js/lib/common';
36+
import { HighlightJs } from "@highlightjs/vue-plugin";
37+
</script>
38+
```
39+
2740
## Using the pre-built libraries
2841

2942
```html

0 commit comments

Comments
 (0)