-
Notifications
You must be signed in to change notification settings - Fork 183
Closed
Description
Use Case
We're building an email client and need to customize how <blockquote> elements are processed during DOM-to-Model conversion. In our application, email citations use blockquotes with zero margins:
<blockquote style="margin-top: 0; margin-bottom: 0;">...</blockquote>We want these blockquotes to always preserve their FormatContainer semantics, but the default knownElementProcessor only triggers formatContainerProcessor when certain style values are > 0.
Request
Please export formatContainerProcessor from the public API, so users can use it in processorOverride for custom processing needs:
// In roosterjs-content-model-dom/lib/index.ts
export { formatContainerProcessor } from './domToModel/processors/formatContainerProcessor';Current Workarounds
Without the public export, we have to use fragile workarounds:
Option 1: Require internal module path
const { formatContainerProcessor } = require(
'roosterjs-content-model-dom/lib/domToModel/processors/formatContainerProcessor'
);Option 2: Borrow from another tag's default processor
processorOverride: {
blockquote: (group, element, context) => {
context.defaultElementProcessors.pre(group, element, context);
},
},Rationale
- Other processors (
childProcessor,entityProcessor,tableProcessor) are already publicly exported processorOverrideis a public API, but users lack access to reusable processor implementations- Exporting
formatContainerProcessorwould enable legitimate customization without relying on internal paths
Metadata
Metadata
Assignees
Labels
No labels