
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
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,003 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.