@mdxeditor/editor 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -4
- package/dist/index.js +2 -2
- package/dist/plugins/codeblock/CodeBlockNode.js +4 -4
- package/dist/plugins/codeblock/MdastCodeVisitor.js +3 -2
- package/dist/plugins/codeblock/findCodeBlockDescriptor.js +8 -0
- package/dist/plugins/codeblock/index.js +3 -3
- package/dist/plugins/core/MdastParagraphVisitor.js +9 -3
- package/dist/plugins/core/NestedLexicalEditor.js +4 -1
- package/dist/plugins/core/index.js +4 -1
- package/dist/plugins/table/TableEditor.js +5 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -599,7 +599,8 @@ export declare const codeBlockPlugin: (params?: {
|
|
|
599
599
|
*/
|
|
600
600
|
codeBlockEditorDescriptors?: CodeBlockEditorDescriptor[];
|
|
601
601
|
/**
|
|
602
|
-
* The default language
|
|
602
|
+
* The default code block language. Used when inserting a new code block, and as a fallback at import time for
|
|
603
|
+
* fences whose language has no matching descriptor.
|
|
603
604
|
*/
|
|
604
605
|
defaultCodeBlockLanguage?: string;
|
|
605
606
|
} | undefined) => RealmPlugin;
|
|
@@ -846,7 +847,8 @@ export declare const debouncedIndexer$: NodeRef<TextNodeIndex>;
|
|
|
846
847
|
export declare const DEFAULT_FORMAT: 0;
|
|
847
848
|
|
|
848
849
|
/**
|
|
849
|
-
*
|
|
850
|
+
* The default code block language. Used both when inserting a new code block without an explicit language, and as a
|
|
851
|
+
* fallback at import time when a fence's own language doesn't match any registered descriptor.
|
|
850
852
|
* @group Code Block
|
|
851
853
|
*/
|
|
852
854
|
export declare const defaultCodeBlockLanguage$: NodeRef<string>;
|
|
@@ -899,12 +901,16 @@ export declare const defaultSvgIcons: {
|
|
|
899
901
|
};
|
|
900
902
|
|
|
901
903
|
/**
|
|
902
|
-
*
|
|
904
|
+
* Per-plugin import context passed to {@link MdastImportVisitor} functions.
|
|
903
905
|
*/
|
|
904
906
|
export declare interface Descriptors {
|
|
905
907
|
jsxComponentDescriptors: JsxComponentDescriptor[];
|
|
906
908
|
directiveDescriptors: DirectiveDescriptor[];
|
|
907
909
|
codeBlockEditorDescriptors: CodeBlockEditorDescriptor[];
|
|
910
|
+
/**
|
|
911
|
+
* The fallback language used to select a code block editor when a fenced code block's own language has no matching descriptor.
|
|
912
|
+
*/
|
|
913
|
+
defaultCodeBlockLanguage?: string;
|
|
908
914
|
}
|
|
909
915
|
|
|
910
916
|
/**
|
|
@@ -2146,7 +2152,7 @@ export declare interface MdastImportVisitor<UN extends Mdast.Nodes> {
|
|
|
2146
2152
|
/**
|
|
2147
2153
|
* The test function that determines if this visitor should be used for the given node.
|
|
2148
2154
|
* As a convenience, you can also pass a string here, which will be compared to the node's type.
|
|
2149
|
-
* @param descriptors - the registered descriptors for composite nodes
|
|
2155
|
+
* @param descriptors - the registered descriptors and fallback values for composite nodes.
|
|
2150
2156
|
*/
|
|
2151
2157
|
testNode: ((mdastNode: Mdast.Nodes, descriptors: Descriptors) => boolean) | string;
|
|
2152
2158
|
visitNode(params: {
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { MDXEditor } from "./MDXEditor.js";
|
|
|
4
4
|
import { defaultSvgIcons } from "./defaultSvgIcons.js";
|
|
5
5
|
import { MarkdownParseError, UnrecognizedMarkdownConstructError, importMarkdownToLexical, importMdastTreeToLexical } from "./importMarkdownToLexical.js";
|
|
6
6
|
import { exportLexicalTreeToMdast, exportMarkdownFromLexical } from "./exportMarkdownFromLexical.js";
|
|
7
|
-
import { Appender, NESTED_EDITOR_UPDATED_COMMAND, activeEditor$, activeEditorSubscriptions$, activePlugins$, addActivePlugin$, addBottomAreaChild$, addComposerChild$, addEditorWrapper$, addExportVisitor$, addImportVisitor$, addLexicalNode$, addMdastExtension$, addNestedEditorChild$, addSyntaxExtension$, addTableCellEditorChild$, addToMarkdownExtension$, addTopAreaChild$, applyBlockType$, applyFormat$, autoFocus$, bottomAreaChildren$, codeBlockEditorDescriptors$, composerChildren$, contentEditableClassName$, contentEditableRef$, contentEditableWrapperElement$, convertSelectionToNode$, corePlugin, createActiveEditorSubscription$, createRootEditorSubscription$, currentBlockType$, currentFormat$, currentSelection$, directiveDescriptors$, editorInFocus$, editorInTable$, editorRootElementRef$, editorWrapperElementRef$, editorWrappers$, exportVisitors$, historyState$, iconComponentFor$, importVisitors$, inFocus$, initialMarkdown$, initialMarkdownNormalize$, insertDecoratorNode$, insertMarkdown$, jsxComponentDescriptors$, jsxIsAvailable$, lexicalTheme$, markdown$, markdownErrorSignal$, markdownProcessingError$, markdownSourceEditorValue$, mdastExtensions$, muteChange$, nestedEditorChildren$, onBlur$, placeholder$, readOnly$, rootEditor$, rootEditorSubscriptions$, setMarkdown$, spellCheck$, syntaxExtensions$, tableCellEditorChildren$, toMarkdownExtensions$, toMarkdownOptions$, topAreaChildren$, translation$, useTranslation, usedLexicalNodes$, viewMode$ } from "./plugins/core/index.js";
|
|
7
|
+
import { Appender, NESTED_EDITOR_UPDATED_COMMAND, activeEditor$, activeEditorSubscriptions$, activePlugins$, addActivePlugin$, addBottomAreaChild$, addComposerChild$, addEditorWrapper$, addExportVisitor$, addImportVisitor$, addLexicalNode$, addMdastExtension$, addNestedEditorChild$, addSyntaxExtension$, addTableCellEditorChild$, addToMarkdownExtension$, addTopAreaChild$, applyBlockType$, applyFormat$, autoFocus$, bottomAreaChildren$, codeBlockEditorDescriptors$, composerChildren$, contentEditableClassName$, contentEditableRef$, contentEditableWrapperElement$, convertSelectionToNode$, corePlugin, createActiveEditorSubscription$, createRootEditorSubscription$, currentBlockType$, currentFormat$, currentSelection$, defaultCodeBlockLanguage$, directiveDescriptors$, editorInFocus$, editorInTable$, editorRootElementRef$, editorWrapperElementRef$, editorWrappers$, exportVisitors$, historyState$, iconComponentFor$, importVisitors$, inFocus$, initialMarkdown$, initialMarkdownNormalize$, insertDecoratorNode$, insertMarkdown$, jsxComponentDescriptors$, jsxIsAvailable$, lexicalTheme$, markdown$, markdownErrorSignal$, markdownProcessingError$, markdownSourceEditorValue$, mdastExtensions$, muteChange$, nestedEditorChildren$, onBlur$, placeholder$, readOnly$, rootEditor$, rootEditorSubscriptions$, setMarkdown$, spellCheck$, syntaxExtensions$, tableCellEditorChildren$, toMarkdownExtensions$, toMarkdownOptions$, topAreaChildren$, translation$, useTranslation, usedLexicalNodes$, viewMode$ } from "./plugins/core/index.js";
|
|
8
8
|
import { ALL_HEADING_LEVELS, allowedHeadingLevels$, headingsPlugin } from "./plugins/headings/index.js";
|
|
9
9
|
import { insertThematicBreak$, thematicBreakPlugin } from "./plugins/thematic-break/index.js";
|
|
10
10
|
import { applyListType$, currentListType$, listsPlugin } from "./plugins/lists/index.js";
|
|
@@ -18,7 +18,7 @@ import { insertJsx$, isMdastJsxNode, jsxPlugin } from "./plugins/jsx/index.js";
|
|
|
18
18
|
import { GenericJsxEditor } from "./jsx-editors/GenericJsxEditor.js";
|
|
19
19
|
import { EMPTY_VALUE, codeBlockLanguages$, codeMirrorAutoLoadLanguageSupport$, codeMirrorExtensions$, codeMirrorPlugin, getCodeBlockLanguageSelectData, insertCodeMirror$, normalizeCodeBlockLanguages } from "./plugins/codemirror/index.js";
|
|
20
20
|
import { COMMON_STATE_CONFIG_EXTENSIONS, CodeMirrorEditor } from "./plugins/codemirror/CodeMirrorEditor.js";
|
|
21
|
-
import { appendCodeBlockEditorDescriptor$, codeBlockPlugin,
|
|
21
|
+
import { appendCodeBlockEditorDescriptor$, codeBlockPlugin, insertCodeBlock$ } from "./plugins/codeblock/index.js";
|
|
22
22
|
import { directivesPlugin, insertDirective$ } from "./plugins/directives/index.js";
|
|
23
23
|
import { ADMONITION_TYPES, AdmonitionDirectiveDescriptor } from "./directive-editors/AdmonitionDirectiveDescriptor.js";
|
|
24
24
|
import { GenericDirectiveEditor } from "./directive-editors/GenericDirectiveEditor.js";
|
|
@@ -7,9 +7,10 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import { useCellValue } from "@mdxeditor/gurx";
|
|
8
8
|
import { DecoratorNode } from "lexical";
|
|
9
9
|
import React__default from "react";
|
|
10
|
-
import
|
|
10
|
+
import "./index.js";
|
|
11
11
|
import { voidEmitter } from "../../utils/voidEmitter.js";
|
|
12
|
-
import { codeBlockEditorDescriptors$, NESTED_EDITOR_UPDATED_COMMAND } from "../core/index.js";
|
|
12
|
+
import { codeBlockEditorDescriptors$, defaultCodeBlockLanguage$, NESTED_EDITOR_UPDATED_COMMAND } from "../core/index.js";
|
|
13
|
+
import { findCodeBlockDescriptor } from "./findCodeBlockDescriptor.js";
|
|
13
14
|
class CodeBlockNode extends DecoratorNode {
|
|
14
15
|
constructor(code, language, meta, key) {
|
|
15
16
|
super(key);
|
|
@@ -151,8 +152,7 @@ function useCodeBlockEditorContext() {
|
|
|
151
152
|
const CodeBlockEditorContainer = (props) => {
|
|
152
153
|
const codeBlockEditorDescriptors = useCellValue(codeBlockEditorDescriptors$);
|
|
153
154
|
const defaultCodeBlockLanguage = useCellValue(defaultCodeBlockLanguage$);
|
|
154
|
-
|
|
155
|
-
descriptor ?? (descriptor = codeBlockEditorDescriptors.find((descriptor2) => descriptor2.match(defaultCodeBlockLanguage || "", props.meta || "")));
|
|
155
|
+
const descriptor = findCodeBlockDescriptor(codeBlockEditorDescriptors, props.language, props.meta, defaultCodeBlockLanguage);
|
|
156
156
|
if (!descriptor) {
|
|
157
157
|
throw new Error(`No CodeBlockEditor registered for language=${props.language} meta=${props.meta}`);
|
|
158
158
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { $createCodeBlockNode } from "./CodeBlockNode.js";
|
|
2
|
+
import { findCodeBlockDescriptor } from "./findCodeBlockDescriptor.js";
|
|
2
3
|
const MdastCodeVisitor = {
|
|
3
|
-
testNode: (node, { codeBlockEditorDescriptors }) => {
|
|
4
|
+
testNode: (node, { codeBlockEditorDescriptors, defaultCodeBlockLanguage }) => {
|
|
4
5
|
if (node.type === "code") {
|
|
5
|
-
const descriptor = codeBlockEditorDescriptors
|
|
6
|
+
const descriptor = findCodeBlockDescriptor(codeBlockEditorDescriptors, node.lang, node.meta, defaultCodeBlockLanguage);
|
|
6
7
|
return descriptor !== void 0;
|
|
7
8
|
}
|
|
8
9
|
return false;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function findCodeBlockDescriptor(descriptors, language, meta, defaultLanguage) {
|
|
2
|
+
const sortedDescriptors = [...descriptors].sort((a, b) => b.priority - a.priority);
|
|
3
|
+
const resolvedMeta = meta ?? "";
|
|
4
|
+
return sortedDescriptors.find((descriptor) => descriptor.match(language ?? "", resolvedMeta)) ?? sortedDescriptors.find((descriptor) => descriptor.match(defaultLanguage ?? "", resolvedMeta));
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
findCodeBlockDescriptor
|
|
8
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { CodeBlockVisitor } from "./CodeBlockVisitor.js";
|
|
2
2
|
import { MdastCodeVisitor } from "./MdastCodeVisitor.js";
|
|
3
|
-
import { Appender, insertDecoratorNode$, codeBlockEditorDescriptors$, addExportVisitor$, addLexicalNode$, addImportVisitor$, addActivePlugin$ } from "../core/index.js";
|
|
3
|
+
import { Appender, defaultCodeBlockLanguage$, insertDecoratorNode$, codeBlockEditorDescriptors$, addExportVisitor$, addLexicalNode$, addImportVisitor$, addActivePlugin$ } from "../core/index.js";
|
|
4
4
|
import { $createCodeBlockNode, CodeBlockNode } from "./CodeBlockNode.js";
|
|
5
5
|
import { $convertPreElement, $isCodeBlockNode, useCodeBlockEditorContext } from "./CodeBlockNode.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Signal, withLatestFrom, map } from "@mdxeditor/gurx";
|
|
7
7
|
import { realmPlugin } from "../../RealmWithPlugins.js";
|
|
8
|
-
const defaultCodeBlockLanguage$ = Cell("");
|
|
9
8
|
const insertCodeBlock$ = Signal((r) => {
|
|
10
9
|
r.link(
|
|
11
10
|
r.pipe(
|
|
@@ -26,6 +25,7 @@ const codeBlockPlugin = realmPlugin({
|
|
|
26
25
|
init(realm, params) {
|
|
27
26
|
realm.pubIn({
|
|
28
27
|
[addActivePlugin$]: "codeblock",
|
|
28
|
+
[defaultCodeBlockLanguage$]: (params == null ? void 0 : params.defaultCodeBlockLanguage) ?? "",
|
|
29
29
|
[codeBlockEditorDescriptors$]: (params == null ? void 0 : params.codeBlockEditorDescriptors) ?? [],
|
|
30
30
|
[addImportVisitor$]: MdastCodeVisitor,
|
|
31
31
|
[addLexicalNode$]: CodeBlockNode,
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { $createParagraphNode } from "lexical";
|
|
1
|
+
import { $createLineBreakNode, $createParagraphNode } from "lexical";
|
|
2
2
|
const lexicalTypesThatShouldSkipParagraphs = ["listitem", "admonition"];
|
|
3
3
|
const MdastParagraphVisitor = {
|
|
4
4
|
testNode: "paragraph",
|
|
5
|
-
visitNode: function({ mdastNode, lexicalParent, actions }) {
|
|
6
|
-
|
|
5
|
+
visitNode: function({ mdastNode, mdastParent, lexicalParent, actions }) {
|
|
6
|
+
const parentType = lexicalParent.getType();
|
|
7
|
+
if (lexicalTypesThatShouldSkipParagraphs.includes(parentType)) {
|
|
8
|
+
const mdastNodeIndex = (mdastParent == null ? void 0 : mdastParent.children.indexOf(mdastNode)) ?? -1;
|
|
9
|
+
const previousMdastSibling = mdastNodeIndex > 0 ? mdastParent == null ? void 0 : mdastParent.children.at(mdastNodeIndex - 1) : void 0;
|
|
10
|
+
if (parentType === "listitem" && (previousMdastSibling == null ? void 0 : previousMdastSibling.type) === "paragraph") {
|
|
11
|
+
lexicalParent.append($createLineBreakNode(), $createLineBreakNode());
|
|
12
|
+
}
|
|
7
13
|
actions.visitChildren(mdastNode, lexicalParent);
|
|
8
14
|
} else {
|
|
9
15
|
actions.addAndStepInto($createParagraphNode());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $addUpdateTag, $getNodeByKey, createEditor, $getRoot, FOCUS_COMMAND, COMMAND_PRIORITY_LOW, BLUR_COMMAND, COMMAND_PRIORITY_EDITOR, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_HIGH, KEY_BACKSPACE_COMMAND, COMMAND_PRIORITY_CRITICAL } from "lexical";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import { NESTED_EDITOR_UPDATED_COMMAND, rootEditor$, importVisitors$, exportVisitors$, usedLexicalNodes$, jsxComponentDescriptors$, directiveDescriptors$, codeBlockEditorDescriptors$, jsxIsAvailable$, nestedEditorChildren$, lexicalTheme$, editorInFocus$ } from "./index.js";
|
|
3
|
+
import { NESTED_EDITOR_UPDATED_COMMAND, rootEditor$, importVisitors$, exportVisitors$, usedLexicalNodes$, jsxComponentDescriptors$, directiveDescriptors$, codeBlockEditorDescriptors$, defaultCodeBlockLanguage$, jsxIsAvailable$, nestedEditorChildren$, lexicalTheme$, editorInFocus$ } from "./index.js";
|
|
4
4
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
5
5
|
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
6
6
|
import { LexicalNestedComposer } from "@lexical/react/LexicalNestedComposer";
|
|
@@ -62,6 +62,7 @@ const NestedLexicalEditor = function(props) {
|
|
|
62
62
|
jsxComponentDescriptors,
|
|
63
63
|
directiveDescriptors,
|
|
64
64
|
codeBlockEditorDescriptors,
|
|
65
|
+
defaultCodeBlockLanguage,
|
|
65
66
|
jsxIsAvailable,
|
|
66
67
|
nestedEditorChildren,
|
|
67
68
|
lexicalTheme
|
|
@@ -73,6 +74,7 @@ const NestedLexicalEditor = function(props) {
|
|
|
73
74
|
jsxComponentDescriptors$,
|
|
74
75
|
directiveDescriptors$,
|
|
75
76
|
codeBlockEditorDescriptors$,
|
|
77
|
+
defaultCodeBlockLanguage$,
|
|
76
78
|
jsxIsAvailable$,
|
|
77
79
|
nestedEditorChildren$,
|
|
78
80
|
lexicalTheme$
|
|
@@ -111,6 +113,7 @@ const NestedLexicalEditor = function(props) {
|
|
|
111
113
|
visitors: importVisitors,
|
|
112
114
|
directiveDescriptors,
|
|
113
115
|
codeBlockEditorDescriptors,
|
|
116
|
+
defaultCodeBlockLanguage,
|
|
114
117
|
jsxComponentDescriptors
|
|
115
118
|
});
|
|
116
119
|
});
|
|
@@ -113,6 +113,7 @@ const jsxIsAvailable$ = Cell(false);
|
|
|
113
113
|
const jsxComponentDescriptors$ = Cell([]);
|
|
114
114
|
const directiveDescriptors$ = Cell([]);
|
|
115
115
|
const codeBlockEditorDescriptors$ = Cell([]);
|
|
116
|
+
const defaultCodeBlockLanguage$ = Cell("");
|
|
116
117
|
const editorRootElementRef$ = Cell(null);
|
|
117
118
|
const editorWrapperElementRef$ = Cell(null);
|
|
118
119
|
const contentEditableRef$ = Cell(null);
|
|
@@ -375,7 +376,8 @@ function tryImportingMarkdown(r, node, markdownValue) {
|
|
|
375
376
|
syntaxExtensions: r.getValue(syntaxExtensions$),
|
|
376
377
|
jsxComponentDescriptors: r.getValue(jsxComponentDescriptors$),
|
|
377
378
|
directiveDescriptors: r.getValue(directiveDescriptors$),
|
|
378
|
-
codeBlockEditorDescriptors: r.getValue(codeBlockEditorDescriptors$)
|
|
379
|
+
codeBlockEditorDescriptors: r.getValue(codeBlockEditorDescriptors$),
|
|
380
|
+
defaultCodeBlockLanguage: r.getValue(defaultCodeBlockLanguage$)
|
|
379
381
|
});
|
|
380
382
|
r.pub(markdownProcessingError$, null);
|
|
381
383
|
} catch (e) {
|
|
@@ -647,6 +649,7 @@ export {
|
|
|
647
649
|
currentBlockType$,
|
|
648
650
|
currentFormat$,
|
|
649
651
|
currentSelection$,
|
|
652
|
+
defaultCodeBlockLanguage$,
|
|
650
653
|
directiveDescriptors$,
|
|
651
654
|
editorInFocus$,
|
|
652
655
|
editorInTable$,
|
|
@@ -15,7 +15,7 @@ import classNames from "classnames";
|
|
|
15
15
|
import styles from "../../styles/ui.module.css.js";
|
|
16
16
|
import { isPartOftheEditorUI } from "../../utils/isPartOftheEditorUI.js";
|
|
17
17
|
import { uuidv4 } from "../../utils/uuid4.js";
|
|
18
|
-
import { iconComponentFor$, readOnly$, useTranslation, editorRootElementRef$, importVisitors$, exportVisitors$, usedLexicalNodes$, jsxComponentDescriptors$, directiveDescriptors$, codeBlockEditorDescriptors$, jsxIsAvailable$, rootEditor$, tableCellEditorChildren$, NESTED_EDITOR_UPDATED_COMMAND } from "../core/index.js";
|
|
18
|
+
import { iconComponentFor$, readOnly$, useTranslation, editorRootElementRef$, importVisitors$, exportVisitors$, usedLexicalNodes$, jsxComponentDescriptors$, directiveDescriptors$, codeBlockEditorDescriptors$, defaultCodeBlockLanguage$, jsxIsAvailable$, rootEditor$, tableCellEditorChildren$, NESTED_EDITOR_UPDATED_COMMAND } from "../core/index.js";
|
|
19
19
|
import { useCellValues } from "@mdxeditor/gurx";
|
|
20
20
|
const getCellType = (rowIndex) => {
|
|
21
21
|
if (rowIndex === 0) {
|
|
@@ -215,6 +215,7 @@ const CellEditor = ({ focus, setActiveCell, parentEditor, lexicalTable, contents
|
|
|
215
215
|
jsxComponentDescriptors,
|
|
216
216
|
directiveDescriptors,
|
|
217
217
|
codeBlockEditorDescriptors,
|
|
218
|
+
defaultCodeBlockLanguage,
|
|
218
219
|
jsxIsAvailable,
|
|
219
220
|
rootEditor,
|
|
220
221
|
tableCellEditorChildren
|
|
@@ -225,6 +226,7 @@ const CellEditor = ({ focus, setActiveCell, parentEditor, lexicalTable, contents
|
|
|
225
226
|
jsxComponentDescriptors$,
|
|
226
227
|
directiveDescriptors$,
|
|
227
228
|
codeBlockEditorDescriptors$,
|
|
229
|
+
defaultCodeBlockLanguage$,
|
|
228
230
|
jsxIsAvailable$,
|
|
229
231
|
rootEditor$,
|
|
230
232
|
tableCellEditorChildren$
|
|
@@ -242,7 +244,8 @@ const CellEditor = ({ focus, setActiveCell, parentEditor, lexicalTable, contents
|
|
|
242
244
|
visitors: importVisitors,
|
|
243
245
|
jsxComponentDescriptors,
|
|
244
246
|
directiveDescriptors,
|
|
245
|
-
codeBlockEditorDescriptors
|
|
247
|
+
codeBlockEditorDescriptors,
|
|
248
|
+
defaultCodeBlockLanguage
|
|
246
249
|
});
|
|
247
250
|
});
|
|
248
251
|
return editor2;
|