@@ -242,7 +242,7 @@ export function addNodeAndExtensionsToSpec<
242242 } ,
243243 // TODO: this should not have wrapInBlockStructure and generally be a lot simpler
244244 // post-processing in externalHTMLExporter should not be necessary
245- toExternalHTML : ( block , editor ) => {
245+ toExternalHTML : ( block , editor , context ) => {
246246 const blockContentDOMAttributes =
247247 node . options . domAttributes ?. blockContent || { } ;
248248
@@ -251,6 +251,7 @@ export function addNodeAndExtensionsToSpec<
251251 { blockContentDOMAttributes } ,
252252 block as any ,
253253 editor as any ,
254+ context ,
254255 ) ??
255256 blockImplementation . render . call (
256257 { blockContentDOMAttributes, renderType : "dom" , props : undefined } ,
@@ -393,11 +394,12 @@ export function createBlockSpec<
393394 ...blockImplementation ,
394395 // TODO: this should not have wrapInBlockStructure and generally be a lot simpler
395396 // post-processing in externalHTMLExporter should not be necessary
396- toExternalHTML ( block , editor ) {
397+ toExternalHTML ( block , editor , context ) {
397398 const output = blockImplementation . toExternalHTML ?. call (
398399 { blockContentDOMAttributes : this . blockContentDOMAttributes } ,
399400 block as any ,
400401 editor as any ,
402+ context ,
401403 ) ;
402404
403405 if ( output === undefined ) {
0 commit comments