question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS needed for example code highlighting to work

See original GitHub issue

Hi your example needs the prism css for highlighting to work ie add the line import 'prismjs/themes/prism.css'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

3reactions
satya164commented, Feb 15, 2019

It’s mentioned in the README that you might need to import some CSS https://github.com/satya164/react-simple-code-editor/blob/master/README.md#usage

0reactions
satya164commented, Aug 17, 2019

@FateRiddle how is linking to the docs passive aggressive? it’s an open source project and I work on it on my free time. I don’t have time to write detailed answer to every github issue. if my answer is not satisfying to you, feel free to send PR to improve the README or answer in issues. anyway, that doesn’t mean you should be rude.

regardless, this library doesn’t do syntax highlighting. it only renders a text area over your syntax highlighted code. you can use prism or any other library you want. how you make syntax highlighting work is outside the scope of this library. if you’re setting up prism, you need to follow prism docs for that, or any docs of the lib you’re using. this is already mentioned in README. but if it’s not clear, then PR welcome to make it more clearer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS needed for example code highlighting to work #16 - GitHub
Hi your example needs the prism css for highlighting to work ie add the line import 'prismjs/themes/prism.css'
Read more >
How To Create a Syntax Highlighter - W3Schools
Learn how to create and use a Syntax Highlighter. Syntax Highlighter. Code snippets are easier to read when you add some color:.
Read more >
Adding Syntax Highlighting to Code Snippets in a Blog or ...
I've received a few requests on how to highlight the syntax of snippets of in a blog like I have. Here is an...
Read more >
10 CSS & JavaScript Snippets for Beautiful Syntax Highlighting
If you write many coding articles or need to add code onto your landing page, then these free CSS and JS code snippets...
Read more >
Creating an Editable Textarea That Supports Syntax ...
This is an example of a syntax-highlighted textarea . The textarea, almost completely transparent except for the caret-color , is positioned on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found