remove languages option from codeblocklowlight

This commit is contained in:
Philipp Kühn
2021-04-08 22:13:50 +02:00
parent 95f31f48fd
commit bd392ee8c2
4 changed files with 35 additions and 64 deletions

View File

@@ -14,11 +14,10 @@ import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'
import CodeBlockComponent from './CodeBlockComponent'
import javascript from 'highlight.js/lib/languages/javascript'
import css from 'highlight.js/lib/languages/css'
import CodeBlock from './CodeBlock'
// install all highlight.js languages
import 'lowlight'
export default {
components: {
@@ -37,18 +36,11 @@ export default {
Document,
Paragraph,
Text,
CodeBlockLowlight
.extend({
addNodeView() {
return VueNodeViewRenderer(CodeBlock)
},
})
.configure({
languages: {
javascript,
css,
},
}),
CodeBlockLowlight.extend({
addNodeView() {
return VueNodeViewRenderer(CodeBlockComponent)
},
}),
],
content: `
<p>