diff --git a/packages/roosterjs-content-model-core/lib/coreApi/formatContentModel/formatContentModel.ts b/packages/roosterjs-content-model-core/lib/coreApi/formatContentModel/formatContentModel.ts index 0861964bb97..35be053782e 100644 --- a/packages/roosterjs-content-model-core/lib/coreApi/formatContentModel/formatContentModel.ts +++ b/packages/roosterjs-content-model-core/lib/coreApi/formatContentModel/formatContentModel.ts @@ -26,10 +26,8 @@ export const formatContentModel: FormatContentModel = ( domToModelOptions ) => { const { - apiName, onNodeCreated, getChangeData, - changeSource, rawEvent, selectionOverride, scrollCaretIntoView: scroll, @@ -79,9 +77,9 @@ export const formatContentModel: FormatContentModel = ( eventType: 'contentChanged', contentModel: clearModelCache ? undefined : model, selection: clearModelCache ? undefined : selection, - source: changeSource || ChangeSource.Format, + source: options?.changeSource || ChangeSource.Format, data: getChangeData?.(), - formatApiName: apiName, + formatApiName: options?.apiName, changedEntities: getChangedEntities(context, rawEvent), };