Is it working right now?
See original GitHub issueI added it to a Vue 3 project and the output I am getting is this(Attached a screenshot below). Even with specifically setting the language to js.
Dependency Versions
- highlight.js": "^11.2.0
- “@highlightjs/vue-plugin”: “^2.1.0”
Installation
import hljs from 'highlight.js/lib/core';
import javascript from 'highlight.js/lib/languages/javascript';
import hljsVuePlugin from "@highlightjs/vue-plugin";
hljs.registerLanguage('javascript', javascript);
app.use(hljsVuePlugin)
Usage: Step 1
<template>
<highlightjs
language="js"
code="function chipPaginate(page) {
if (typeof sortOrderNew === 'undefined')
var sortOrder = 3;
if (typeof sortOrderNew !== 'undefined')
var sortOrder = sortOrderNew;
console.log(sortOrder);
}
"
/>
</template>
Usage: Step 2
<script>
components: {
"highlightjs": hljsVuePlugin.component
},
</script>
Output
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Is It Down Right Now? Website Down or Not?
"Is It Down Right Now" monitors the status of your favorite web sites and checks whether they are down or not. Check a...
Read more >Downdetector
Real-time problem & outage monitoring We tell you when your favorite services are down or having problems.
Read more >Is it down? Check at Down for Everyone or Just Me
Check if a website or service is down or having problems. Click now to check!
Read more >Support - System Status - Apple
Looking for developer system status? Find it hereDeveloper system status - find it here.. Last updated today, 9:00 PM Pacific Standard Time.
Read more >Online Services - Activision Support
Stay Connected! For any outages, we'll let you know as soon as services are back online. Experiencing an outage?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you provide a repo?
edit: I suspect you’re not importing a theme CSS e.g.
import 'highlight.js/styles/stackoverflow-light.css'
Ah, yes that was the issue. Thanks for the help I appreciate it.