-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ec482f
commit a6287f4
Showing
67 changed files
with
1,018 additions
and
687 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...content-model/roosterjs-content-model-dom/lib/domToModel/context/buildBaseProcessorMap.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,14 @@ | ||
import { defaultProcessorMap } from './defaultProcessors'; | ||
import { ElementProcessorMap } from 'roosterjs-content-model-types'; | ||
|
||
/** | ||
* Build a DOM processor map with overrides that can be used as base processor map | ||
* @param processorOverrides DOM processor overrides to default processors. | ||
* Note: Inside an override processor it cannot call original processor using context.defaultElementProcessors.<ProcessorName> | ||
* since here the default processor is also overridden | ||
*/ | ||
export function buildBaseProcessorMap( | ||
...processorOverrides: (Partial<ElementProcessorMap> | undefined)[] | ||
): ElementProcessorMap { | ||
return Object.assign({}, defaultProcessorMap, ...processorOverrides); | ||
} |
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
21 changes: 6 additions & 15 deletions
21
packages-content-model/roosterjs-content-model-dom/lib/domToModel/domToContentModel.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
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
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
Oops, something went wrong.