Questions tagged [prismjs]

PrismJS is a JavaScript based syntax highlighter. Please also include the tag for the JavaScript technology you are using, for example: [javascript], [reactjs], [node.js], etc. Please do NOT include the tag of the language you are trying to highlight.

PrismJS is an extensible JavaScript-based syntax highlighter.

The Documentation:

124 questions
13
votes
6 answers

PrismJS no line breaks

Not sure if anyone has come across this. I'm using PrismJS syntax highlighter to highlight code. Application is written in Reactjs and what I'm trying to do is inside a WYSIWYG editor I'm wrapping user selected text with pre + code when user wants…
TSlegaitis
  • 1,231
  • 15
  • 29
8
votes
3 answers

Static html generation with prismjs - how to enable line-numbers?

I'm using node.js to generate static html files from code, formatting them with prismjs. Within my app, I do not have access to an HTML renderer that supports Javascript (I'm using 'htmllite'). So I need to be able to generate HTML that does not…
tig
  • 3,424
  • 3
  • 32
  • 65
6
votes
1 answer

Prismjs not working error Prism is not defined

I'm trying to use prism to make a code editor, I copied a template from this codesandbox here. The error is: ./node_modules/prismjs/components/prism-clike.js E:/Trabajos/Personal projects/OpenAI/Code…
6
votes
1 answer

Get slot data as a variable in Vue?

I have a component (prism-editor) that only takes code from v-model="code". This means, the code has to be sent to the component through code: Code.vue