How to use the roosterjs-html-sanitizer.HtmlSanitizer.sanitizeHtml function in roosterjs-html-sanitizer

To help you get started, we’ve selected a few roosterjs-html-sanitizer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / roosterjs / publish / samplesite / scripts / controls / sidePane / apiPlayground / sanitizer / SanitizerPane.tsx View on Github external
private sanitize = () => {
        this.result.current.value = HtmlSanitizer.sanitizeHtml(this.source.current.value);
    };
}
github microsoft / roosterjs / packages / roosterjs-editor-dom / lib / utils / sanitizeHtml.ts View on Github external
export default function sanitizeHtml(
    html: string,
    additionalStyleNodes?: HTMLStyleElement[],
    convertInlineCssOnly?: boolean,
    propertyCallbacks?: SanitizeHtmlPropertyCallback,
    preserveFragmentOnly?: boolean,
    currentStyle?: StyleMap
): string {
    return HtmlSanitizer.sanitizeHtml(html, {
        additionalGlobalStyleNodes: additionalStyleNodes,
        convertCssOnly: convertInlineCssOnly,
        attributeCallbacks: propertyCallbacks,
        currentElementOrStyle: currentStyle,
        preserveFragmentOnly,
    });
}

roosterjs-html-sanitizer

This package is deprecated, and this is the last version of this package.

MIT
Latest version published 4 years ago

Package Health Score

63 / 100
Full package analysis

Similar packages