Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
92 views

I'm facing an issue with highlight.js. When I include code containing German text with umlauts (e.g. "ö"), the code gets rendered incorrectly starting from the point where the umlaut appears....
tom's user avatar
  • 11k
1 vote
1 answer
54 views

I'm trying to create a syntax highlighter for the Klipper 3D printer firmware. The language consists of settings elements, comments and Jinja2 template elements. In the first place, I wanted to get a ...
Tom's user avatar
  • 91
-1 votes
1 answer
51 views

I have set up Highlighterjs with my NextJS@13+ page routing, but the code block is taking single line with scroll-x. Look at the image... If i remove the useEffect the highliger is gone, but the line ...
Yousuf Ahamad's user avatar
-2 votes
1 answer
51 views

I use highlight.js in my Django project, and it doesn't work. It doesn't, highlight the code, but it wraps it with many span class tags. My base.html: <html lang="en" class="h-100&...
A1pha's user avatar
  • 3
0 votes
1 answer
498 views

So basically, I'm trying to make the code block the same color as the background (In this case white), while still keeping the colors on the code. What I've Tried I've tried overriding the theme's CSS ...
Skrillx's user avatar
  • 82
0 votes
1 answer
192 views

I have a Jquery JS script that loads a modal window. In that modal window there is a pre code tag where i via ajax pulls in a script. I want to use Highlight.js to make the code more readable. I have ...
Wyrm's user avatar
  • 29
1 vote
0 answers
196 views

I'm trying to use rollup to build a bundle containing highlight.js. This is the starter project I'm using to build the bundle. If we clone it and run: git clone [email protected]:fireflysemantics/fs-lit-...
Ole's user avatar
  • 48.2k
1 vote
1 answer
308 views

I have a web component with a <pre><code>... section which I would like styled by an external stylesheet (highlightJS). NOTE: My Web Component has a slot and the pre and code blocks are ...
Marc's user avatar
  • 15k
1 vote
1 answer
120 views

I'm trying to syntax highlight some code with highlight.js used with deno / fresh. My failed attempts are with the current versions of deno/fresh/highlight.js at august 7, 2024. I'm working on Windows ...
crillion's user avatar
  • 380
1 vote
1 answer
168 views

I'm trying to get a styled block of code on my website. Highlight.js seems to be what I'm looking for. However when I run my website it doesn't show the layout. What I've done so far: 1 install it by ...
user24127089's user avatar
1 vote
0 answers
609 views

I'm using the highlight.js library to display code snippets on my webpage. I'd like to add a button that allows users to switch between light and dark themes for the code snippets. Ideally, clicking ...
codebysumit's user avatar
1 vote
0 answers
40 views

According to official documentation, syntaxhightlight version 11 remove useBR configuration. It recommend to use plugin or simply css white-space:pre I can do it with plugin like this. <!...
Liudi Wijaya's user avatar
1 vote
1 answer
235 views

I want to utilise highlight.js in a a-h/templ template, but I can't get the pre block to format correctly. The goal is to have: <pre> <code class="language-go"> var User ...
Chris Armitage's user avatar
0 votes
1 answer
157 views

This demo first highlights html contained inside the fs-highlight element and assigns the result to the _code property. The render method then renders the template with the _code highlighted html ...
Ole's user avatar
  • 48.2k
2 votes
0 answers
91 views

How do we use highlight.js inside a lit element web component if we are importing highlight.js in a index.html file. So for example in the head element of index.html we may have this: <link ...
Ole's user avatar
  • 48.2k
0 votes
1 answer
33 views

Trying to highlight an external file main.cpp with highlight.js I put together the following: <!DOCTYPE html> <html> <head> <link rel="stylesheet" href=&...
KcFnMi's user avatar
  • 6,367
0 votes
1 answer
73 views

I have used highlight.js successfully in other places. but I can't get it to work now. Code disappears. hljs.highlightAll() <pre><code class="language-html"> <!-- android - change ...
Pycm's user avatar
  • 888
1 vote
0 answers
399 views

I would like to have 1 textarea with markdown syntax highlighting. I am currently using highlight.js. I wrote a proof of concept, however, this provides me with an additional text area. I would like ...
RandomGuy007's user avatar
0 votes
1 answer
701 views

I want to display example content of a response in paths.{url}.{method}.responses section of OpenAPI v3.0.0 specs in highlight.js. I am currently getting such object from a remote JSON OpenAPI spec: &...
Ilyas Khametov's user avatar
2 votes
0 answers
309 views

I am running highlight.js in the WordPress block editor and set highlight.js to run when core/code block is updated. The core/code block natively uses <br data-rich-text-line-break="true"&...
Jeremy Faucher's user avatar
2 votes
1 answer
553 views

I'm using (client/browser side, not in Node): Marked 9: <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/marked.umd.min.js"></script> Highlight.js 11: <script src=&...
igorludi's user avatar
  • 1,644
3 votes
2 answers
2k views

I try to create a plugin in nuxt3 that uses highligh.js and use it on my components. But I can't do it I make this : // @/plugins/highlight.js import 'highlight.js/styles/stackoverflow-light.css' ...
felixleo22's user avatar
0 votes
1 answer
189 views

Using the below code, I am getting the raw html instead and not formatted syntax. what am I missing? <script setup> import hljs from 'highlight.js/lib/core'; import sql from 'highlight.js/lib/...
Francois Taljaard's user avatar
0 votes
1 answer
75 views

The documentation says I just have to install the filters via npm in order to use them. If you want to be able to use filters in your Pug template, you would first make sure that these features are ...
Matheus Moreira's user avatar
0 votes
2 answers
276 views

I would like to syntax highlight my SASS code with highlight.js NPM package. However, I cannot get it to work. SASS is not syntax highlighted, and the console displays this warning: a text-...
Chiara Ani's user avatar
  • 1,135
1 vote
1 answer
655 views

Good day, I am trying to create a markdown previewer using Svelte. I'm using the following libraries for different tasks: Marked library for parsing markdown, Highlight.js for highlighting code ...
cordialgoblin's user avatar
0 votes
1 answer
1k views

I tried to use highlight.js to apply syntax highlighting to dynamic content. The dynamic content is an .html file that is read from a server and is embedded on the current page, and within this .html ...
ominousSHELL's user avatar
0 votes
1 answer
48 views

i use highlight js in my website for code if i have a long line of code it comes out of the page and And the appearance of the page is ruined for example: this is a broken page of my site: https://...
رضا کشوری's user avatar
1 vote
0 answers
1k views

I have a React app in which there are a couple areas where users need to edit rich text bodies that can include merge field tokens in certain formats. (There are two: one is the <<[ ]>> ...
Grank's user avatar
  • 5,292
0 votes
1 answer
120 views

I installed the codesnippet plugin by copying the files in the plugins folder I added codesnippet to the extra plugins line in include.php: $ckeditor->config['extraPlugins'] = 'codesnippet,droplets,...
Jochen's user avatar
  • 33
1 vote
2 answers
808 views

I am trying to use the library highlight.js for code highlighting, and it does come with support for ES modules. When I try to use it in a ES6 module compiled from TS, it comes back with the error: ...
MrDiamond's user avatar
  • 1,102
0 votes
1 answer
221 views

I cannot get syntax highlighting to work for code fetched from GitHub. fetch("https://raw.githubusercontent.com/Ayanmullick/test/master/AutomationAcc/test1.ps1") .then(response => ...
Ayan Mullick's user avatar
-1 votes
1 answer
746 views

I am building a webpage in Vue3. On this webpage I want to display some Solidity code and I would like it to be pretty and highlightend. I found the Highlight.js (link) library. And I also found "...
Yachara's user avatar
  • 21
1 vote
0 answers
581 views

I'm currently using highlight.js to hightlight the code in the HTML content being received from my backend. An example of something I might receive from the backend is: <h3> Check this example ...
Bruno Francisco's user avatar
0 votes
2 answers
2k views

I have a VueJS where I have created a component for rendering the contents from a WYSIWYG component (tiptap). I have the following content being returned from the backend let x = 0; enum A {} ...
Bruno Francisco's user avatar
1 vote
1 answer
3k views

I am trying to use highlight.js with react but the syntax highlighting is now working. I am trying to store the highlighted syntax inside a variable but the whole content is displayed without ...
sn_23's user avatar
  • 15
1 vote
0 answers
106 views

Gitlab uses highlight.js which supports the Scilab language, but it does not work as it can be seen in source tree files or snippets: https://gitlab.com/scilab/scilab/-/blob/6.1/scilab/modules/cacsd/...
Stéphane Mottelet's user avatar
0 votes
0 answers
126 views

I'm trying to make local code editor github-dark theme based with highlight.js library. But when importing from local file (literally copied source code on https://unpkg.com/[email protected]/min....
Neo's user avatar
  • 1
1 vote
2 answers
2k views

I have a Jekyll blog, where I changed the code highlighter from Rouge (the default) to highlight.js, and it works perfectly. However, I also want line numbers on my code snippets. Since highlight.js ...
wermos's user avatar
  • 354
1 vote
0 answers
448 views

I know that there is another question with this topic, but it does not use import syntax and nuxt-js. In my nuxt app, I have four themes that the user could change them with a button on navigation. ...
hamid-davodi's user avatar
  • 2,024
0 votes
1 answer
142 views

I have a website that I am making that uses the highlight.js script. It's basically a syntax highlighting javascript code that highlights all <code> blocks. I have a <code contenteditable> ...
Craze XD's user avatar
  • 110
12 votes
0 answers
11k views

I'm writing my README.md file for a Github repository, which contains some requisitions written for manual testing the application. The tool I use to make the manual tests is the REST Client extension ...
Pitossomo's user avatar
  • 121
1 vote
2 answers
3k views

I want to use highlight.js in my website.But it doesn't work. I use unpkg CDN and I import it like that: <link rel="stylesheet" href="https://unpkg.com/@highlightjs/[email protected]/...
WindowsRegedit's user avatar
0 votes
1 answer
322 views

I am trying to add highlight.js to my Hugo website with Anatole theme. This is how a code chunk looks like before adding highlightjs: And this is how it looks like after adding highlight.js: This is ...
martinolmos's user avatar
7 votes
0 answers
3k views

I am using highlight.js for Froala editor code blocks at React. But I'm getting en error. I used registerLanguage function but it didn't work. Error in browser: Here is my code : import ...
user avatar
2 votes
2 answers
4k views

The built-in markdown editor has a "live-preview" for code blocks without open a side previewer. I was looking for a list of supported language highlight, which as I understand is defined by ...
cyperatk's user avatar
  • 101
7 votes
2 answers
3k views

I created a simple Rails 7 application with Post, Comment models using Tailwindcss. And I have a problem with importing the highlight.js library to render syntax code in Trix editor. This is config/...
Johan's user avatar
  • 143
1 vote
1 answer
2k views

Based on the code sample, how to add new language like c#, php, java, sql, etc. This sample was provided by a man who answered my question last month. I tried to add new languages but not working. ...
Blue Silhouette's user avatar
-1 votes
3 answers
1k views

<div class="container"> <pre> <code class="language-html"> <h1>I want to display html tag</h1> </code> </...
Blue Silhouette's user avatar
2 votes
2 answers
2k views

I have the following code. It simply makes the python script formatted, with the colors using highlight.js. hljs.highlightAll(); function clicked(){ if(document.getElementById("code")....
user avatar