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.

Not working without highlighter in 2.0.0-alpha.2

See original GitHub issue

Version: 2.0.0-alpha.2

prism-editor component won’t work at all without :highlight function prop assigned eg. like so <prism-editor :highlight="highlighter"></prism-editor>

To counter this I had to do this empty highlighter function in my code:

  methods: {
    highlighter(code) {
      // Won't work with highlighter
      return code;
    },
  },

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kocacommented, Mar 21, 2021

hey @antja0. Oh i see. I don’t see the value of default function but we should improve the docs, you’re right. Thanks.

0reactions
kocacommented, Mar 21, 2021

hey @SibeeshVenu, since v1 this library has nothing to do with prismjs package, so the error youre getting from prismjs/components/prism-core is not related to vue-prism-editor. Your issue is different from @antja0. As TS compiler suggests, you need to install types for prismjs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

observablehq/highlight.js - UNPKG
The CDN for @observablehq/highlight.js. ... 1, # Highlight.js. 2 ... 24, work for you, you can specify the language in the `class` attribute:....
Read more >
vue-prism-editor | Yarn - Package Manager
A dead simple code editor with syntax highlighting and line numbers. 3kb/z. prism-editor. Editor works both for Vue 2.x and Vue 3.x and...
Read more >
vue.js - Could not find a declaration file for module 'prismjs ...
I try some ways with typescript, found that this is the easiest way. first. yarn add @types/prismjs. then. import { highlight, languages ...
Read more >
2.0.0-alpha.32 - Docusaurus
This fix a bug whereby if user has core-js@3 on its own node_modules but docusaurus depends on core-js@2, we previously encounter Module not...
Read more >
Changelog of ngx-extended-pdf-viewer - PdfShowcase
Also see https://github.com/mozilla/pdf.js/issues/10948 and ... 2.0.0-alpha.1 #194 add an option to display the PDF file without the border.
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