From f8e792cf7adb55309e71ea849fdfd9512457b386 Mon Sep 17 00:00:00 2001 From: moander Date: Fri, 24 Nov 2023 16:19:09 +0100 Subject: [PATCH 1/2] (feat) allow usage without registering plugin --- src/vue.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vue.ts b/src/vue.ts index dc575d6..154455f 100644 --- a/src/vue.ts +++ b/src/vue.ts @@ -82,3 +82,5 @@ const plugin: Plugin & { component: typeof component } = { } export default plugin + +export const HighlightJs = component From 05cae6ec8de6a29834c73913a00ca64707fb9f11 Mon Sep 17 00:00:00 2001 From: moander Date: Fri, 24 Nov 2023 16:19:19 +0100 Subject: [PATCH 2/2] script setup example --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 1b91df3..1f05d29 100644 --- a/README.md +++ b/README.md @@ -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 + + + +``` + ## Using the pre-built libraries ```html