|
|
@ -184,6 +184,7 @@ import _ from 'lodash'
|
|
|
|
import { get, sync } from 'vuex-pathify'
|
|
|
|
import { get, sync } from 'vuex-pathify'
|
|
|
|
import markdownHelp from './markdown/help.vue'
|
|
|
|
import markdownHelp from './markdown/help.vue'
|
|
|
|
import gql from 'graphql-tag'
|
|
|
|
import gql from 'graphql-tag'
|
|
|
|
|
|
|
|
import DOMPurify from 'dompurify'
|
|
|
|
|
|
|
|
|
|
|
|
/* global siteConfig, siteLangs */
|
|
|
|
/* global siteConfig, siteLangs */
|
|
|
|
|
|
|
|
|
|
|
@ -395,7 +396,7 @@ export default {
|
|
|
|
onCmInput: _.debounce(function (newContent) {
|
|
|
|
onCmInput: _.debounce(function (newContent) {
|
|
|
|
linesMap = []
|
|
|
|
linesMap = []
|
|
|
|
this.$store.set('editor/content', newContent)
|
|
|
|
this.$store.set('editor/content', newContent)
|
|
|
|
this.previewHTML = md.render(newContent)
|
|
|
|
this.previewHTML = DOMPurify.sanitize(md.render(newContent))
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.renderMermaidDiagrams()
|
|
|
|
this.renderMermaidDiagrams()
|
|
|
|
Prism.highlightAllUnder(this.$refs.editorPreview)
|
|
|
|
Prism.highlightAllUnder(this.$refs.editorPreview)
|
|
|
|