@@ -88,6 +88,7 @@ export interface EditorInt
8888 readonly preset : EditorPreset ;
8989 readonly mdOptions : Readonly < MarkdownEditorMdOptions > ;
9090 readonly directiveSyntax : DirectiveSyntaxContext ;
91+ readonly mobile : boolean ;
9192
9293 /** @internal used in demo for dev-tools */
9394 readonly _wysiwygView ?: PMEditorView ;
@@ -126,7 +127,7 @@ export type ChangeEditorModeOptions = {
126127
127128export type EditorOptions = Pick <
128129 MarkdownEditorOptions ,
129- 'md' | 'initial' | 'handlers' | 'experimental' | 'markupConfig' | 'wysiwygConfig'
130+ 'md' | 'initial' | 'handlers' | 'experimental' | 'markupConfig' | 'wysiwygConfig' | 'mobile'
130131> & {
131132 logger : Logger2 . ILogger ;
132133 renderStorage : ReactRenderStorage ;
@@ -165,6 +166,7 @@ export class EditorImpl extends SafeEventEmitter<EventMapInt> implements EditorI
165166 #beforeEditorModeChange?: (
166167 options : Pick < ChangeEditorModeOptions , 'mode' | 'reason' > ,
167168 ) => boolean | undefined ;
169+ #mobile: boolean ;
168170
169171 get _wysiwygView ( ) : PMEditorView {
170172 // @ts -expect-error internal typing
@@ -336,6 +338,10 @@ export class EditorImpl extends SafeEventEmitter<EventMapInt> implements EditorI
336338 return this . #enableNewImageSizeCalculation;
337339 }
338340
341+ get mobile ( ) : boolean {
342+ return this . #mobile;
343+ }
344+
339345 constructor ( opts : EditorOptions ) {
340346 const { logger} = opts ;
341347
@@ -353,6 +359,7 @@ export class EditorImpl extends SafeEventEmitter<EventMapInt> implements EditorI
353359 experimental = { } ,
354360 markupConfig = { } ,
355361 wysiwygConfig = { } ,
362+ mobile = false ,
356363 } = opts ;
357364
358365 this . #logger = logger ;
@@ -388,6 +395,7 @@ export class EditorImpl extends SafeEventEmitter<EventMapInt> implements EditorI
388395 this . #prepareRawMarkup = experimental . prepareRawMarkup ;
389396 this . #escapeConfig = wysiwygConfig . escapeConfig ;
390397 this . #beforeEditorModeChange = experimental . beforeEditorModeChange ;
398+ this . #mobile = mobile ;
391399 }
392400
393401 // ---> implements CodeEditor
0 commit comments