-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Content Model: Add back ContentModelBeforePasteEvent (#2347)
- Loading branch information
1 parent
98f69d4
commit 7ada3d3
Showing
4 changed files
with
47 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...tent-model/roosterjs-content-model-editor/lib/publicTypes/ContentModelBeforePasteEvent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { BeforePasteEvent } from 'roosterjs-editor-types'; | ||
import type { | ||
DomToModelOptionForPaste, | ||
MergePastedContentFunc, | ||
} from 'roosterjs-content-model-types'; | ||
|
||
/** | ||
* A temporary event type to be compatible with both legacy plugin and content model editor | ||
*/ | ||
export interface ContentModelBeforePasteEvent extends BeforePasteEvent { | ||
/** | ||
* domToModel Options to use when creating the content model from the paste fragment | ||
*/ | ||
readonly domToModelOption: DomToModelOptionForPaste; | ||
|
||
/** | ||
* customizedMerge Customized merge function to use when merging the paste fragment into the editor | ||
*/ | ||
customizedMerge?: MergePastedContentFunc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters