diff --git a/libs/tiptap-editor/src/index.ts b/libs/tiptap-editor/src/index.ts index f4fcc65..483e8c0 100644 --- a/libs/tiptap-editor/src/index.ts +++ b/libs/tiptap-editor/src/index.ts @@ -3,7 +3,9 @@ import { FileHandler } from '@tiptap/extension-file-handler'; import { TaskItem, TaskList } from '@tiptap/extension-list'; import { TableKit } from '@tiptap/extension-table'; import { Markdown } from '@tiptap/markdown'; +import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'; import StarterKit from '@tiptap/starter-kit'; +import { lowlight } from './highlight'; import { SlashCommand } from './slash-command'; import { TaskInputRule } from './task-input-rule'; import { @@ -98,8 +100,10 @@ class TiptapEditorInstance { linkOnPaste: true, HTMLAttributes: { rel: 'noopener noreferrer', target: '_blank' }, }, + codeBlock: false, }), Markdown, + CodeBlockLowlight.configure({ lowlight }), TableKit, UploadImage, TaskList,