Skip to content

Commit

Permalink
script setup example
Browse files Browse the repository at this point in the history
  • Loading branch information
moander committed Nov 24, 2023
1 parent f8e792c commit 05cae6e
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit 05cae6e

Please sign in to comment.