vue-prism-component | highlight code using prism.js and vue component | Frontend Framework library
kandi X-RAY | vue-prism-component Summary
kandi X-RAY | vue-prism-component Summary
highlight code using prism.js and vue component
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vue-prism-component
vue-prism-component Key Features
vue-prism-component Examples and Code Snippets
Community Discussions
Trending Discussions on vue-prism-component
QUESTION
For the purpose of learning Vue, I am trying to create a very simple app that will return highlighted code from the input in real-time. I went through a few Prism tutorials and examples, but can't get this to work. Any help or guidance will be appreciated, as I am just getting started with Vue and I have a feeling that I am mixing something up.
This is HelloWorld.vue
:
ANSWER
Answered 2020-Jun-14 at 12:26You should add Prism
to your components option components:{Prism}
and then in the template wrap the code with that component and no need to create a computed property :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vue-prism-component
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page