highlight.js Questions

5

So I have been struggling to use Highlight.JS in a textarea, because this doesn't work: <!DOCTYPE html> <html> <head> <title>Hello World</title> <link rel="s...
Merchantable asked 13/10, 2013 at 15:40

2

Solved

I'm using highlight.js to highlight code blocks in HTML. highlight.js can find all code blocks and determine the language automatically but I would like to specify both element(s) and language(s) m...
Flautist asked 9/6, 2014 at 14:33

5

I'm using Next.js for my blog and I'm storing my blogs in markdown files and converting those files to string and then into HTML using Greymatter. My code blocks break down into <pre><code...
Ramble asked 11/5, 2020 at 4:30

2

As the official highlight.js usage document suggests: The default import imports all languages! Therefore it is likely to be more efficient to import only the library and the languages you need:...
Moderation asked 23/1, 2019 at 20:8

0

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 extens...

0

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 Froala...
Hilleary asked 17/3, 2022 at 10:44

2

Solved

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...
Justiciary asked 10/1, 2022 at 17:24

2

Solved

I need to highlight a block of code but at the same time, I need the code to be placed on separate and numbered lines, to leave comments for each line of code, just as can be done on Github. I mana...
Sufficient asked 9/10, 2020 at 13:12

5

Solved

I am trying to add syntax highlighting to my application using highlight.js but it doesn't seem to work with Angular 2. Could you please let me know what I might be doing incorrectly? Here is the...
Cartagena asked 18/5, 2016 at 18:53

3

I am using TiddlyWiki version 5.1.13. I have added the highlight plugin (version 5.1.13) which uses highlight.js (version 8.8.0). In a tiddler I successfully highlight XML like this: ```xml <...
Melanoid asked 20/4, 2017 at 10:31

1

I am preparing a presentation with reveal.js where I would like to show some lines of code. If I just have a slide with the code, it is shown in a panel with a scrollbar containing the complete co...
Stylet asked 17/6, 2016 at 15:29

2

Is there a way to emphasize lines with highlight.js? For instance by coloring them differently, changing the background color, or other means.
Backpack asked 20/3, 2015 at 18:7

1

Solved

I want to extend highlight.js capabilities for R language so that (1) all function names that are followed by opening parenthesis ( and (2) all package names that are followed by :: and ::: operato...
Trici asked 30/6, 2018 at 0:51

4

Solved

I'm trying to integrate Highlight.js with Blogger. So far, the syntax highlighting works great, but I can't seem to find a way of preventing the code lines inside the <pre><code> elemen...

0

I'm using highlight.js to style Java and it's generating markup for strings, keywords and numbers but not for types and literals. I'm using highlight.js/9.11.0. Suggestions? See example: https://...
Tuesday asked 12/5, 2017 at 22:26

1

Solved

I've used this, and it works but it feels kind of hacky. I've tried copying the highlight.pack.js file to web/static/js and calling it from a .html.eex file but that just gives me an error. I've tr...
Valuator asked 16/12, 2016 at 10:34

1

Solved

I'm not a front-end developer and have been struggling for hours to get highlight.js to do what I want. Need to display code nicely in a blog. Okay, it works perfectly in that it renders the code I...

1

Solved

Updated with the proper link to the example I am using a Hugo theme that comes with bundled with CSS and uses Highlight.JS for syntax highlighting. The web pages I have created show a plain "couri...
Befoul asked 25/5, 2016 at 2:20

3

Solved

I've got a presentation running with reveal.js and everything is working. I am writing some sample code and highlight.js is working well within my presentation. But, I want to incrementally display...
Intertype asked 10/6, 2014 at 22:0

1

I'm trying to create language definition for highlight.js. But it doesn't work. I've got an example. In this example i'm trying to create custom "aaa" language, which is the same as JSON. register...
Equalize asked 20/2, 2015 at 13:41

1

Solved

I'm having trouble formatting my output. I want each line of text to be horizontal on the left side. Here is the code I am using. <div style="text-align: left;"> <pre style="width: 75%; ...
Mascot asked 22/10, 2014 at 17:38

1

Here is the HTML, pretty straight forward: <script>hljs.initHighlightingOnLoad();</script> <div class="container"> <section> <pre> <code> function() { cons...
Dunlap asked 19/6, 2014 at 19:47
1

© 2022 - 2024 — McMap. All rights reserved.