Site > File > Viewer > Add syntaxic coloration

This commit is contained in:
brunosimon
2017-08-15 22:56:16 +02:00
parent 72a95b8904
commit 3c58b9bdfa
172 changed files with 12740 additions and 10 deletions
+23
View File
@@ -1,3 +1,8 @@
import Vue from 'vue'
import VueHighlightJS from 'vue-highlightjs'
Vue.use(VueHighlightJS)
export default
{
name: 'viewer',
@@ -12,5 +17,23 @@ export default
{
return this.$store.state.files.currentVersion
}
},
methods:
{
onCodeKeyDown(event)
{
if(!event.metaKey && !event.ctrlKey)
{
event.preventDefault()
}
else
{
if(event.keyCode === 88 || event.keyCode === 86)
{
event.preventDefault()
}
}
}
}
}