@@ -10,6 +10,7 @@
},
"dependencies": {
"axios": "^0.15.3",
+ "highlight.js": "^9.10.0",
"lodash.throttle": "^4.1.1",
"marked": "^0.3.6",
"vue": "^2.1.0",
@@ -72,6 +72,13 @@
import Marked from 'marked'
+ Marked.setOptions({
+ highlight: function (code) {
+ return require('highlight.js').highlightAuto(code).value;
+ },
+ sanitize: true
+ });
+
export default {
name: 'InputEditor',
props: ['value', 'float', 'replyUsername', 'hideClose', 'show', 'error'],