RichText/Archived/Rooster/Rooster.gcomp/Support/node_modules/roosterjs/dist/rooster-amd.js
/**
 * Converts the list between UL and OL if needed, by using the fake bullet and
 * information already stored in the list itself
 */
Converts the list between UL and OL if needed, by using the fake bullet and
information already stored in the list itself
Converts the list between UL and OL if needed by using the fake bullet and information already stored in the list itself
function convertListIfNeeded(wordConverter, list, listMetadata) {
    if (listMetadata.tagName != roosterjs_editor_dom_1.getTagOfNode(list)) {
        var newList = list.ownerDocument.createElement(listMetadata.tagName);
        CustomData_1.setObject(wordConverter.customData, newList, UNIQUE_LIST_ID_CUSTOM_DATA, CustomData_1.getObject(wordConverter.customData, list, UNIQUE_LIST_ID_CUSTOM_DATA));
        while (list.firstChild) {
            newList.appendChild(list.firstChild);
        }
        list.parentNode.insertBefore(newList, list);
        list.parentNode.removeChild(list);
        list = newList;
    }
    return list;
}
function convertListIfNeeded ( wordConverter , list , listMetadata ) { if ( listMetadata . tagName != roosterjs_editor_dom_1 . getTagOfNode ( list ) ) { var newList = list . ownerDocument . createElement ( listMetadata . tagName ) ; CustomData_1 . setObject ( wordConverter . customData , newList , UNIQUE_LIST_ID_CUSTOM_DATA , CustomData_1 . getObject ( wordConverter . customData , list , UNIQUE_LIST_ID_CUSTOM_DATA ) ) ; while ( list . firstChild ) { newList . appendChild ( list . firstChild ) ; } list . parentNode . insertBefore ( newList , list ) ; list . parentNode . removeChild ( list ) ; list = newList ; } return list ; }
Converts the list between UL and OL if needed, by using the fake bullet and
 information already stored in the list itself
Converts the list between UL and OL if needed by using the fake bullet and information already stored in the list itself
// Check if we need to convert the list out // We have the wrong list type.. convert it, set the id again and tranfer all the childs