mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
feat: Add support for code blocks in comments (#12480)
* feat: Add support for code blocks in comments * Add code_block
This commit is contained in:
@@ -9,6 +9,8 @@ import {
|
||||
richExtensions,
|
||||
withComments,
|
||||
} from "@shared/editor/nodes";
|
||||
import CodeBlock from "@shared/editor/nodes/CodeBlock";
|
||||
import CodeFence from "@shared/editor/nodes/CodeFence";
|
||||
import Mention from "@shared/editor/nodes/Mention";
|
||||
|
||||
populateEmojiData(data as EmojiMartData);
|
||||
@@ -56,7 +58,7 @@ export const basicParser = basicExtensionManager.parser({
|
||||
plugins: basicExtensionManager.rulePlugins,
|
||||
});
|
||||
|
||||
const commentExtensions = [...basicExtensions, Mention];
|
||||
const commentExtensions = [...basicExtensions, CodeBlock, CodeFence, Mention];
|
||||
export const commentExtensionManager = new ExtensionManager(commentExtensions);
|
||||
|
||||
export const commentSchema = new Schema({
|
||||
|
||||
Reference in New Issue
Block a user