Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x 1x 453x 453x 11x 453x | import { isWhiteSpacePreserved } from 'roosterjs-content-model-dom'; import type { ElementProcessor } from 'roosterjs-content-model-types'; /** * @internal */ export const pasteTextProcessor: ElementProcessor<Text> = (group, text, context) => { const whiteSpace = context.blockFormat.whiteSpace; if (isWhiteSpacePreserved(whiteSpace)) { text.nodeValue = text.nodeValue?.replace(/\u0020\u0020/g, '\u0020\u00A0') ?? ''; } context.defaultElementProcessors['#text'](group, text, context); }; |