
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
vue3-highlightjs
Advanced tools
Vue.js 3.x syntax highlighting made easy, using highlight.js.
npm install --save vue3-highlightjs or use dist/vue3-highlight.min.js
For vue-cli/vite user:
import { createApp } from 'vue'
import VueHighlightJS from 'vue3-highlightjs'
import 'highlight.js/styles/solarized-light.css'
const app = createApp({})
app.use(VueHighlightJS)
For standalone usage:
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/default.min.css" />
<script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
<script src="../dist/vue3-highlight.js"></script>
In Vue sfc
<pre v-highlightjs="sourcecode"><code class="javascript"></code></pre>
<pre v-highlightjs><code class="javascript">const s = new Date().toString()</code></pre>
In html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/styles/default.min.css" />
</head>
<body>
<div id="app">
<pre v-highlightjs><code class="javascript">const s = new Date().toString()</code></pre>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.3.2/highlight.min.js"></script>
<script src="../dist/vue3-highlight.js"></script>
<script>
Vue.createApp({}).use(Vue3Highlightjs).mount('#app')
</script>
</body>
</html>
FAQs
Syntax highlighting with highlight.js for Vue.js 3.x
The npm package vue3-highlightjs receives a total of 3,048 weekly downloads. As such, vue3-highlightjs popularity was classified as popular.
We found that vue3-highlightjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.