@@ -79,6 +79,7 @@ export type PlaygroundProps = {
7979 onChangeSplitModeEnabled ?: ( splitModeEnabled : boolean ) => void ;
8080 directiveSyntax ?: DirectiveSyntaxValue ;
8181 disabledHTMLBlockModes ?: EmbeddingMode [ ] ;
82+ disableMarkdownItAttrs ?: boolean ;
8283} & Pick < UseMarkdownEditorProps , 'experimental' | 'wysiwygConfig' > &
8384 Pick <
8485 MarkdownEditorViewProps ,
@@ -128,6 +129,7 @@ export const Playground = memo<PlaygroundProps>((props) => {
128129 experimental,
129130 directiveSyntax,
130131 disabledHTMLBlockModes,
132+ disableMarkdownItAttrs,
131133 } = props ;
132134 const [ editorMode , setEditorMode ] = useState < MarkdownEditorMode > ( initialEditor ?? 'wysiwyg' ) ;
133135 const [ mdRaw , setMdRaw ] = useState < MarkupString > ( initial || '' ) ;
@@ -146,10 +148,11 @@ export const Playground = memo<PlaygroundProps>((props) => {
146148 breaks = { md . breaks }
147149 needToSanitizeHtml = { sanitizeHtml }
148150 plugins = { getPlugins ( { directiveSyntax} ) }
151+ disableMarkdownItAttrs = { disableMarkdownItAttrs }
149152 htmlRuntimeConfig = { { disabledModes : disabledHTMLBlockModes } }
150153 />
151154 ) ,
152- [ sanitizeHtml , disabledHTMLBlockModes ] ,
155+ [ sanitizeHtml , disabledHTMLBlockModes , disableMarkdownItAttrs ] ,
153156 ) ;
154157
155158 const logger = useMemo ( ( ) => new Logger2 ( ) . nested ( { env : 'playground' } ) , [ ] ) ;
@@ -161,6 +164,7 @@ export const Playground = memo<PlaygroundProps>((props) => {
161164 preset : 'full' ,
162165 wysiwygConfig : {
163166 placeholderOptions : placeholderOptions ,
167+ disableMarkdownAttrs : disableMarkdownItAttrs ,
164168 extensions : ( builder ) => {
165169 builder
166170 . use ( Math , {
@@ -250,6 +254,7 @@ export const Playground = memo<PlaygroundProps>((props) => {
250254 experimental ?. beforeEditorModeChange ,
251255 experimental ?. prepareRawMarkup ,
252256 directiveSyntax ,
257+ disableMarkdownItAttrs ,
253258 ] ,
254259 ) ;
255260
0 commit comments