We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46047ba commit d5b31c1Copy full SHA for d5b31c1
src/components/post/Editor.vue
@@ -89,6 +89,7 @@ import Vue from 'vue'
89
import DOMPurify from 'dompurify'
90
import Turndown from 'turndown'
91
import { strikethrough } from 'turndown-plugin-gfm'
92
+import hljs from 'highlight.js'
93
import type { RangeStatic, Quill } from 'quill'
94
import QuillMarkdown from 'quilljs-markdown'
95
import XIcon from '@/components/icons/X.vue'
@@ -155,6 +156,9 @@ const options = {
155
156
bounds: `#editor`,
157
scrollingContainer: `#editor`,
158
modules: {
159
+ syntax: {
160
+ highlight: (code: string) => hljs.highlightAuto(code).value,
161
+ },
162
counter: true,
163
toolbar: {
164
container: toolbarOptions,
0 commit comments