RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Convert pasted content from Excel, add borders when source doc doesn't have a border
 * @param doc HTML Document which contains the content from Excel
 */
Convert pasted content from Excel, add borders when source doc doesn't have a border
@param doc HTML Document which contains the content from Excel
Convert pasted content from Excel add borders when source doc doesn ' t have a border @param doc HTML Document which contains the content from Excel
function convertPastedContentFromExcel(doc) {
    var sanitizer = new roosterjs_html_sanitizer_1.HtmlSanitizer({
        styleCallbacks: {
            border: function (value, element) { return value != 'none' || element.style.border != 'none'; },
        },
        additionalAllowAttributes: ['class'],
    });
    sanitizer.sanitize(doc.body);
    var styleNode = doc.createElement('style');
    doc.body.appendChild(styleNode);
    styleNode.innerHTML = 'td {border: solid 1px #d4d4d4}';
    sanitizer.convertGlobalCssToInlineCss(doc);
}
function convertPastedContentFromExcel ( doc ) { var sanitizer = new roosterjs_html_sanitizer_1 . HtmlSanitizer ( { styleCallbacks : { border : function ( value , element ) { return value != 'none' || element . style . border != 'none' ; } , } , additionalAllowAttributes : [ 'class' ] , } ) ; sanitizer . sanitize ( doc . body ) ; var styleNode = doc . createElement ( 'style' ) ; doc . body . appendChild ( styleNode ) ; styleNode . innerHTML = 'td {border: solid 1px #d4d4d4}' ; sanitizer . convertGlobalCssToInlineCss ( doc ) ; }
Convert pasted content from Excel, add borders when source doc doesn't have a border
 @param doc HTML Document which contains the content from Excel
Convert pasted content from Excel add borders when source doc doesn ' t have a border @param doc HTML Document which contains the content from Excel