11import type { ReactNode } from 'react' ;
22
3+ import type { Extension as CodemirrorExtension } from '@codemirror/state' ;
34import { TextSelection } from 'prosemirror-state' ;
45import { EditorView as PMEditorView } from 'prosemirror-view' ;
56
@@ -135,6 +136,7 @@ export type EditorOptions = Pick<
135136 splitMode ?: SplitMode ;
136137 renderPreview ?: RenderPreview ;
137138 preset : EditorPreset ;
139+ extraMarkupExtensions ?: CodemirrorExtension [ ] ;
138140} ;
139141
140142/** @internal */
@@ -147,6 +149,7 @@ export class EditorImpl extends SafeEventEmitter<EventMapInt> implements EditorI
147149 #renderPreview?: RenderPreview ;
148150 #wysiwygEditor?: WysiwygEditor ;
149151 #markupEditor?: MarkupEditor ;
152+ #extraMarkupExtensions?: CodemirrorExtension [ ] ;
150153
151154 readonly #preset: EditorPreset ;
152155 #allowHTML?: boolean ;
@@ -269,6 +272,7 @@ export class EditorImpl extends SafeEventEmitter<EventMapInt> implements EditorI
269272 reactRenderer : this . #renderStorage,
270273 uploadHandler : this . fileUploadHandler ,
271274 needImgDimms : this . needToSetDimensionsForUploadedImages ,
275+ extraMarkupExtensions : this . #extraMarkupExtensions,
272276 } ) ,
273277 ) ;
274278 }
@@ -302,6 +306,7 @@ export class EditorImpl extends SafeEventEmitter<EventMapInt> implements EditorI
302306 this . #linkifyTlds = opts . linkifyTlds ;
303307 this . #allowHTML = opts . allowHTML ;
304308 this . #extensions = opts . extensions ;
309+ this . #extraMarkupExtensions = opts . extraMarkupExtensions ;
305310
306311 this . #renderStorage = opts . renderStorage ;
307312 this . #fileUploadHandler = opts . fileUploadHandler ;
0 commit comments