diff --git a/packages/roosterjs-content-model-plugins/lib/edit/keyboardEnter.ts b/packages/roosterjs-content-model-plugins/lib/edit/keyboardEnter.ts index ef765e5e231..b8b2217563e 100644 --- a/packages/roosterjs-content-model-plugins/lib/edit/keyboardEnter.ts +++ b/packages/roosterjs-content-model-plugins/lib/edit/keyboardEnter.ts @@ -1,7 +1,12 @@ import { deleteEmptyQuote } from './deleteSteps/deleteEmptyQuote'; -import { deleteSelection, normalizeContentModel, runEditSteps } from 'roosterjs-content-model-dom'; import { handleEnterOnList } from './inputSteps/handleEnterOnList'; import { handleEnterOnParagraph } from './inputSteps/handleEnterOnParagraph'; +import { + ChangeSource, + deleteSelection, + normalizeContentModel, + runEditSteps, +} from 'roosterjs-content-model-dom'; import type { IEditor } from 'roosterjs-content-model-types'; /** @@ -49,6 +54,7 @@ export function keyboardEnter( { rawEvent, scrollCaretIntoView: true, + changeSource: ChangeSource.Keyboard, } ); } diff --git a/packages/roosterjs-content-model-plugins/lib/edit/keyboardInput.ts b/packages/roosterjs-content-model-plugins/lib/edit/keyboardInput.ts index fe8dc9e7bfc..95ffb0d8667 100644 --- a/packages/roosterjs-content-model-plugins/lib/edit/keyboardInput.ts +++ b/packages/roosterjs-content-model-plugins/lib/edit/keyboardInput.ts @@ -1,4 +1,9 @@ -import { deleteSelection, isModifierKey, normalizeContentModel } from 'roosterjs-content-model-dom'; +import { + ChangeSource, + deleteSelection, + isModifierKey, + normalizeContentModel, +} from 'roosterjs-content-model-dom'; import type { DOMSelection, IEditor } from 'roosterjs-content-model-types'; /** @@ -32,6 +37,7 @@ export function keyboardInput(editor: IEditor, rawEvent: KeyboardEvent) { { scrollCaretIntoView: true, rawEvent, + changeSource: ChangeSource.Keyboard, } ); diff --git a/packages/roosterjs-content-model-plugins/lib/edit/keyboardTab.ts b/packages/roosterjs-content-model-plugins/lib/edit/keyboardTab.ts index 7c274f2f0cc..495b79fdc80 100644 --- a/packages/roosterjs-content-model-plugins/lib/edit/keyboardTab.ts +++ b/packages/roosterjs-content-model-plugins/lib/edit/keyboardTab.ts @@ -1,9 +1,13 @@ -import { getOperationalBlocks, isBlockGroupOfType } from 'roosterjs-content-model-dom'; import { handleTabOnList } from './tabUtils/handleTabOnList'; import { handleTabOnParagraph } from './tabUtils/handleTabOnParagraph'; import { handleTabOnTable } from './tabUtils/handleTabOnTable'; import { handleTabOnTableCell } from './tabUtils/handleTabOnTableCell'; import { setModelIndentation } from 'roosterjs-content-model-api'; +import { + ChangeSource, + getOperationalBlocks, + isBlockGroupOfType, +} from 'roosterjs-content-model-dom'; import type { ContentModelListItem, ContentModelTableCell, @@ -37,6 +41,7 @@ export function keyboardTab(editor: IEditor, rawEvent: KeyboardEvent) { }, { apiName: 'handleTabKey', + changeSource: ChangeSource.Keyboard, } ); return true;