Skip to content

yorkane/vue-prism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

vue-prism

Vue component for Prism

Installation:

  1. save prism.vue into your project
  2. npm install prismjs (or yarn add prismjs)

Usage

Only [javascript, markup, css, clike] supported in current version. Default with javascript

code as below

1 Slot inject

<prism>{{code}}</prism>

2 Variable inject

<prism :code="yourCodeVar"></prism>

3 Predefine language

<prism language="css">
.class1 {
color: #000;
}
</prism>

4 Auto language detection

<prism>
for(i = 1, i< 10 , i++) {
  print(i)
}
</prism>

About

Vue component for Prism

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages