RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/** Converts all the Word generated list items in the specified node into standard HTML UL and OL tags */
Converts all the Word generated list items in the specified node into standard HTML UL and OL tags
Converts all the Word generated list items in the specified node into standard HTML UL and OL tags
function convertPastedContentFromWord(doc) {
    var _a;
    var sanitizer = new roosterjs_html_sanitizer_1.HtmlSanitizer({
        elementCallbacks: (_a = {},
            _a['O:P'] = function (element) { return element.innerHTML == '&nbsp;'; },
            _a),
        additionalAllowAttributes: ['class'],
    });
    sanitizer.sanitize(doc.body);
    var wordConverter = wordConverter_1.createWordConverter();
    var elements = doc.querySelectorAll('p');
    if (elements.length > 0) {
        wordConverter.wordConverterArgs = WordConverterArguments_1.createWordConverterArguments(elements);
        if (converterUtils_1.processNodesDiscovery(wordConverter)) {
            converterUtils_1.processNodeConvert(wordConverter);
        }
    }
}
function convertPastedContentFromWord ( doc ) { var _a ; var sanitizer = new roosterjs_html_sanitizer_1 . HtmlSanitizer ( { elementCallbacks : ( _a = { } , _a [ 'O:P' ] = function ( element ) { return element . innerHTML == '&nbsp;' ; } , _a ) , additionalAllowAttributes : [ 'class' ] , } ) ; sanitizer . sanitize ( doc . body ) ; var wordConverter = wordConverter_1 . createWordConverter ( ) ; var elements = doc . querySelectorAll ( 'p' ) ; if ( elements . length > 0 ) { wordConverter . wordConverterArgs = WordConverterArguments_1 . createWordConverterArguments ( elements ) ; if ( converterUtils_1 . processNodesDiscovery ( wordConverter ) ) { converterUtils_1 . processNodeConvert ( wordConverter ) ; } } }
Converts all the Word generated list items in the specified node into standard HTML UL and OL tags
Converts all the Word generated list items in the specified node into standard HTML UL and OL tags
// First find all the nodes that we need to check for list item information // This call will return all the p and header elements under the root node.. These are the elements that // Word uses a list items, so we'll only process them and avoid walking the whole tree.