Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu.../js/tinymce/plugins/lists
File: plugin.js
if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {
[1500] Fix | Delete
DOM$1.remove(node);
[1501] Fix | Delete
break;
[1502] Fix | Delete
}
[1503] Fix | Delete
}
[1504] Fix | Delete
if (!editor.dom.isEmpty(fragment)) {
[1505] Fix | Delete
DOM$1.insertAfter(fragment, ul);
[1506] Fix | Delete
}
[1507] Fix | Delete
DOM$1.insertAfter(newBlock, ul);
[1508] Fix | Delete
if (NodeType.isEmpty(editor.dom, li.parentNode)) {
[1509] Fix | Delete
removeAndKeepBookmarks(li.parentNode);
[1510] Fix | Delete
}
[1511] Fix | Delete
DOM$1.remove(li);
[1512] Fix | Delete
if (NodeType.isEmpty(editor.dom, ul)) {
[1513] Fix | Delete
DOM$1.remove(ul);
[1514] Fix | Delete
}
[1515] Fix | Delete
};
[1516] Fix | Delete
var SplitList = { splitList: splitList };
[1517] Fix | Delete
[1518] Fix | Delete
var outdentDlItem = function (editor, item) {
[1519] Fix | Delete
if (is$1(item, 'dd')) {
[1520] Fix | Delete
mutate(item, 'dt');
[1521] Fix | Delete
} else if (is$1(item, 'dt')) {
[1522] Fix | Delete
parent(item).each(function (dl) {
[1523] Fix | Delete
return SplitList.splitList(editor, dl.dom(), item.dom());
[1524] Fix | Delete
});
[1525] Fix | Delete
}
[1526] Fix | Delete
};
[1527] Fix | Delete
var indentDlItem = function (item) {
[1528] Fix | Delete
if (is$1(item, 'dt')) {
[1529] Fix | Delete
mutate(item, 'dd');
[1530] Fix | Delete
}
[1531] Fix | Delete
};
[1532] Fix | Delete
var dlIndentation = function (editor, indentation, dlItems) {
[1533] Fix | Delete
if (indentation === 'Indent') {
[1534] Fix | Delete
each(dlItems, indentDlItem);
[1535] Fix | Delete
} else {
[1536] Fix | Delete
each(dlItems, function (item) {
[1537] Fix | Delete
return outdentDlItem(editor, item);
[1538] Fix | Delete
});
[1539] Fix | Delete
}
[1540] Fix | Delete
};
[1541] Fix | Delete
[1542] Fix | Delete
var selectionIndentation = function (editor, indentation) {
[1543] Fix | Delete
var lists = map(Selection.getSelectedListRoots(editor), Element.fromDom);
[1544] Fix | Delete
var dlItems = map(Selection.getSelectedDlItems(editor), Element.fromDom);
[1545] Fix | Delete
var isHandled = false;
[1546] Fix | Delete
if (lists.length || dlItems.length) {
[1547] Fix | Delete
var bookmark = editor.selection.getBookmark();
[1548] Fix | Delete
listsIndentation(editor, lists, indentation);
[1549] Fix | Delete
dlIndentation(editor, indentation, dlItems);
[1550] Fix | Delete
editor.selection.moveToBookmark(bookmark);
[1551] Fix | Delete
editor.selection.setRng(Range.normalizeRange(editor.selection.getRng()));
[1552] Fix | Delete
editor.nodeChanged();
[1553] Fix | Delete
isHandled = true;
[1554] Fix | Delete
}
[1555] Fix | Delete
return isHandled;
[1556] Fix | Delete
};
[1557] Fix | Delete
var indentListSelection = function (editor) {
[1558] Fix | Delete
return selectionIndentation(editor, 'Indent');
[1559] Fix | Delete
};
[1560] Fix | Delete
var outdentListSelection = function (editor) {
[1561] Fix | Delete
return selectionIndentation(editor, 'Outdent');
[1562] Fix | Delete
};
[1563] Fix | Delete
var flattenListSelection = function (editor) {
[1564] Fix | Delete
return selectionIndentation(editor, 'Flatten');
[1565] Fix | Delete
};
[1566] Fix | Delete
[1567] Fix | Delete
var updateListStyle = function (dom, el, detail) {
[1568] Fix | Delete
var type = detail['list-style-type'] ? detail['list-style-type'] : null;
[1569] Fix | Delete
dom.setStyle(el, 'list-style-type', type);
[1570] Fix | Delete
};
[1571] Fix | Delete
var setAttribs = function (elm, attrs) {
[1572] Fix | Delete
global$5.each(attrs, function (value, key) {
[1573] Fix | Delete
elm.setAttribute(key, value);
[1574] Fix | Delete
});
[1575] Fix | Delete
};
[1576] Fix | Delete
var updateListAttrs = function (dom, el, detail) {
[1577] Fix | Delete
setAttribs(el, detail['list-attributes']);
[1578] Fix | Delete
global$5.each(dom.select('li', el), function (li) {
[1579] Fix | Delete
setAttribs(li, detail['list-item-attributes']);
[1580] Fix | Delete
});
[1581] Fix | Delete
};
[1582] Fix | Delete
var updateListWithDetails = function (dom, el, detail) {
[1583] Fix | Delete
updateListStyle(dom, el, detail);
[1584] Fix | Delete
updateListAttrs(dom, el, detail);
[1585] Fix | Delete
};
[1586] Fix | Delete
var removeStyles = function (dom, element, styles) {
[1587] Fix | Delete
global$5.each(styles, function (style) {
[1588] Fix | Delete
var _a;
[1589] Fix | Delete
return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
[1590] Fix | Delete
});
[1591] Fix | Delete
};
[1592] Fix | Delete
var getEndPointNode = function (editor, rng, start, root) {
[1593] Fix | Delete
var container, offset;
[1594] Fix | Delete
container = rng[start ? 'startContainer' : 'endContainer'];
[1595] Fix | Delete
offset = rng[start ? 'startOffset' : 'endOffset'];
[1596] Fix | Delete
if (container.nodeType === 1) {
[1597] Fix | Delete
container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
[1598] Fix | Delete
}
[1599] Fix | Delete
if (!start && NodeType.isBr(container.nextSibling)) {
[1600] Fix | Delete
container = container.nextSibling;
[1601] Fix | Delete
}
[1602] Fix | Delete
while (container.parentNode !== root) {
[1603] Fix | Delete
if (NodeType.isTextBlock(editor, container)) {
[1604] Fix | Delete
return container;
[1605] Fix | Delete
}
[1606] Fix | Delete
if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
[1607] Fix | Delete
return container;
[1608] Fix | Delete
}
[1609] Fix | Delete
container = container.parentNode;
[1610] Fix | Delete
}
[1611] Fix | Delete
return container;
[1612] Fix | Delete
};
[1613] Fix | Delete
var getSelectedTextBlocks = function (editor, rng, root) {
[1614] Fix | Delete
var textBlocks = [], dom = editor.dom;
[1615] Fix | Delete
var startNode = getEndPointNode(editor, rng, true, root);
[1616] Fix | Delete
var endNode = getEndPointNode(editor, rng, false, root);
[1617] Fix | Delete
var block;
[1618] Fix | Delete
var siblings = [];
[1619] Fix | Delete
for (var node = startNode; node; node = node.nextSibling) {
[1620] Fix | Delete
siblings.push(node);
[1621] Fix | Delete
if (node === endNode) {
[1622] Fix | Delete
break;
[1623] Fix | Delete
}
[1624] Fix | Delete
}
[1625] Fix | Delete
global$5.each(siblings, function (node) {
[1626] Fix | Delete
if (NodeType.isTextBlock(editor, node)) {
[1627] Fix | Delete
textBlocks.push(node);
[1628] Fix | Delete
block = null;
[1629] Fix | Delete
return;
[1630] Fix | Delete
}
[1631] Fix | Delete
if (dom.isBlock(node) || NodeType.isBr(node)) {
[1632] Fix | Delete
if (NodeType.isBr(node)) {
[1633] Fix | Delete
dom.remove(node);
[1634] Fix | Delete
}
[1635] Fix | Delete
block = null;
[1636] Fix | Delete
return;
[1637] Fix | Delete
}
[1638] Fix | Delete
var nextSibling = node.nextSibling;
[1639] Fix | Delete
if (global$4.isBookmarkNode(node)) {
[1640] Fix | Delete
if (NodeType.isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
[1641] Fix | Delete
block = null;
[1642] Fix | Delete
return;
[1643] Fix | Delete
}
[1644] Fix | Delete
}
[1645] Fix | Delete
if (!block) {
[1646] Fix | Delete
block = dom.create('p');
[1647] Fix | Delete
node.parentNode.insertBefore(block, node);
[1648] Fix | Delete
textBlocks.push(block);
[1649] Fix | Delete
}
[1650] Fix | Delete
block.appendChild(node);
[1651] Fix | Delete
});
[1652] Fix | Delete
return textBlocks;
[1653] Fix | Delete
};
[1654] Fix | Delete
var hasCompatibleStyle = function (dom, sib, detail) {
[1655] Fix | Delete
var sibStyle = dom.getStyle(sib, 'list-style-type');
[1656] Fix | Delete
var detailStyle = detail ? detail['list-style-type'] : '';
[1657] Fix | Delete
detailStyle = detailStyle === null ? '' : detailStyle;
[1658] Fix | Delete
return sibStyle === detailStyle;
[1659] Fix | Delete
};
[1660] Fix | Delete
var applyList = function (editor, listName, detail) {
[1661] Fix | Delete
if (detail === void 0) {
[1662] Fix | Delete
detail = {};
[1663] Fix | Delete
}
[1664] Fix | Delete
var rng = editor.selection.getRng(true);
[1665] Fix | Delete
var bookmark;
[1666] Fix | Delete
var listItemName = 'LI';
[1667] Fix | Delete
var root = Selection.getClosestListRootElm(editor, editor.selection.getStart(true));
[1668] Fix | Delete
var dom = editor.dom;
[1669] Fix | Delete
if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
[1670] Fix | Delete
return;
[1671] Fix | Delete
}
[1672] Fix | Delete
listName = listName.toUpperCase();
[1673] Fix | Delete
if (listName === 'DL') {
[1674] Fix | Delete
listItemName = 'DT';
[1675] Fix | Delete
}
[1676] Fix | Delete
bookmark = Bookmark.createBookmark(rng);
[1677] Fix | Delete
global$5.each(getSelectedTextBlocks(editor, rng, root), function (block) {
[1678] Fix | Delete
var listBlock, sibling;
[1679] Fix | Delete
sibling = block.previousSibling;
[1680] Fix | Delete
if (sibling && NodeType.isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
[1681] Fix | Delete
listBlock = sibling;
[1682] Fix | Delete
block = dom.rename(block, listItemName);
[1683] Fix | Delete
sibling.appendChild(block);
[1684] Fix | Delete
} else {
[1685] Fix | Delete
listBlock = dom.create(listName);
[1686] Fix | Delete
block.parentNode.insertBefore(listBlock, block);
[1687] Fix | Delete
listBlock.appendChild(block);
[1688] Fix | Delete
block = dom.rename(block, listItemName);
[1689] Fix | Delete
}
[1690] Fix | Delete
removeStyles(dom, block, [
[1691] Fix | Delete
'margin',
[1692] Fix | Delete
'margin-right',
[1693] Fix | Delete
'margin-bottom',
[1694] Fix | Delete
'margin-left',
[1695] Fix | Delete
'margin-top',
[1696] Fix | Delete
'padding',
[1697] Fix | Delete
'padding-right',
[1698] Fix | Delete
'padding-bottom',
[1699] Fix | Delete
'padding-left',
[1700] Fix | Delete
'padding-top'
[1701] Fix | Delete
]);
[1702] Fix | Delete
updateListWithDetails(dom, listBlock, detail);
[1703] Fix | Delete
mergeWithAdjacentLists(editor.dom, listBlock);
[1704] Fix | Delete
});
[1705] Fix | Delete
editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
[1706] Fix | Delete
};
[1707] Fix | Delete
var isValidLists = function (list1, list2) {
[1708] Fix | Delete
return list1 && list2 && NodeType.isListNode(list1) && list1.nodeName === list2.nodeName;
[1709] Fix | Delete
};
[1710] Fix | Delete
var hasSameListStyle = function (dom, list1, list2) {
[1711] Fix | Delete
var targetStyle = dom.getStyle(list1, 'list-style-type', true);
[1712] Fix | Delete
var style = dom.getStyle(list2, 'list-style-type', true);
[1713] Fix | Delete
return targetStyle === style;
[1714] Fix | Delete
};
[1715] Fix | Delete
var hasSameClasses = function (elm1, elm2) {
[1716] Fix | Delete
return elm1.className === elm2.className;
[1717] Fix | Delete
};
[1718] Fix | Delete
var shouldMerge = function (dom, list1, list2) {
[1719] Fix | Delete
return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
[1720] Fix | Delete
};
[1721] Fix | Delete
var mergeWithAdjacentLists = function (dom, listBlock) {
[1722] Fix | Delete
var sibling, node;
[1723] Fix | Delete
sibling = listBlock.nextSibling;
[1724] Fix | Delete
if (shouldMerge(dom, listBlock, sibling)) {
[1725] Fix | Delete
while (node = sibling.firstChild) {
[1726] Fix | Delete
listBlock.appendChild(node);
[1727] Fix | Delete
}
[1728] Fix | Delete
dom.remove(sibling);
[1729] Fix | Delete
}
[1730] Fix | Delete
sibling = listBlock.previousSibling;
[1731] Fix | Delete
if (shouldMerge(dom, listBlock, sibling)) {
[1732] Fix | Delete
while (node = sibling.lastChild) {
[1733] Fix | Delete
listBlock.insertBefore(node, listBlock.firstChild);
[1734] Fix | Delete
}
[1735] Fix | Delete
dom.remove(sibling);
[1736] Fix | Delete
}
[1737] Fix | Delete
};
[1738] Fix | Delete
var updateList = function (dom, list, listName, detail) {
[1739] Fix | Delete
if (list.nodeName !== listName) {
[1740] Fix | Delete
var newList = dom.rename(list, listName);
[1741] Fix | Delete
updateListWithDetails(dom, newList, detail);
[1742] Fix | Delete
} else {
[1743] Fix | Delete
updateListWithDetails(dom, list, detail);
[1744] Fix | Delete
}
[1745] Fix | Delete
};
[1746] Fix | Delete
var toggleMultipleLists = function (editor, parentList, lists, listName, detail) {
[1747] Fix | Delete
if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
[1748] Fix | Delete
flattenListSelection(editor);
[1749] Fix | Delete
} else {
[1750] Fix | Delete
var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
[1751] Fix | Delete
global$5.each([parentList].concat(lists), function (elm) {
[1752] Fix | Delete
updateList(editor.dom, elm, listName, detail);
[1753] Fix | Delete
});
[1754] Fix | Delete
editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
[1755] Fix | Delete
}
[1756] Fix | Delete
};
[1757] Fix | Delete
var hasListStyleDetail = function (detail) {
[1758] Fix | Delete
return 'list-style-type' in detail;
[1759] Fix | Delete
};
[1760] Fix | Delete
var toggleSingleList = function (editor, parentList, listName, detail) {
[1761] Fix | Delete
if (parentList === editor.getBody()) {
[1762] Fix | Delete
return;
[1763] Fix | Delete
}
[1764] Fix | Delete
if (parentList) {
[1765] Fix | Delete
if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
[1766] Fix | Delete
flattenListSelection(editor);
[1767] Fix | Delete
} else {
[1768] Fix | Delete
var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
[1769] Fix | Delete
updateListWithDetails(editor.dom, parentList, detail);
[1770] Fix | Delete
mergeWithAdjacentLists(editor.dom, editor.dom.rename(parentList, listName));
[1771] Fix | Delete
editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
[1772] Fix | Delete
}
[1773] Fix | Delete
} else {
[1774] Fix | Delete
applyList(editor, listName, detail);
[1775] Fix | Delete
}
[1776] Fix | Delete
};
[1777] Fix | Delete
var toggleList = function (editor, listName, detail) {
[1778] Fix | Delete
var parentList = Selection.getParentList(editor);
[1779] Fix | Delete
var selectedSubLists = Selection.getSelectedSubLists(editor);
[1780] Fix | Delete
detail = detail ? detail : {};
[1781] Fix | Delete
if (parentList && selectedSubLists.length > 0) {
[1782] Fix | Delete
toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
[1783] Fix | Delete
} else {
[1784] Fix | Delete
toggleSingleList(editor, parentList, listName, detail);
[1785] Fix | Delete
}
[1786] Fix | Delete
};
[1787] Fix | Delete
var ToggleList = {
[1788] Fix | Delete
toggleList: toggleList,
[1789] Fix | Delete
mergeWithAdjacentLists: mergeWithAdjacentLists
[1790] Fix | Delete
};
[1791] Fix | Delete
[1792] Fix | Delete
var DOM$2 = global$6.DOM;
[1793] Fix | Delete
var normalizeList = function (dom, ul) {
[1794] Fix | Delete
var sibling;
[1795] Fix | Delete
var parentNode = ul.parentNode;
[1796] Fix | Delete
if (parentNode.nodeName === 'LI' && parentNode.firstChild === ul) {
[1797] Fix | Delete
sibling = parentNode.previousSibling;
[1798] Fix | Delete
if (sibling && sibling.nodeName === 'LI') {
[1799] Fix | Delete
sibling.appendChild(ul);
[1800] Fix | Delete
if (NodeType.isEmpty(dom, parentNode)) {
[1801] Fix | Delete
DOM$2.remove(parentNode);
[1802] Fix | Delete
}
[1803] Fix | Delete
} else {
[1804] Fix | Delete
DOM$2.setStyle(parentNode, 'listStyleType', 'none');
[1805] Fix | Delete
}
[1806] Fix | Delete
}
[1807] Fix | Delete
if (NodeType.isListNode(parentNode)) {
[1808] Fix | Delete
sibling = parentNode.previousSibling;
[1809] Fix | Delete
if (sibling && sibling.nodeName === 'LI') {
[1810] Fix | Delete
sibling.appendChild(ul);
[1811] Fix | Delete
}
[1812] Fix | Delete
}
[1813] Fix | Delete
};
[1814] Fix | Delete
var normalizeLists = function (dom, element) {
[1815] Fix | Delete
global$5.each(global$5.grep(dom.select('ol,ul', element)), function (ul) {
[1816] Fix | Delete
normalizeList(dom, ul);
[1817] Fix | Delete
});
[1818] Fix | Delete
};
[1819] Fix | Delete
var NormalizeLists = {
[1820] Fix | Delete
normalizeList: normalizeList,
[1821] Fix | Delete
normalizeLists: normalizeLists
[1822] Fix | Delete
};
[1823] Fix | Delete
[1824] Fix | Delete
var findNextCaretContainer = function (editor, rng, isForward, root) {
[1825] Fix | Delete
var node = rng.startContainer;
[1826] Fix | Delete
var offset = rng.startOffset;
[1827] Fix | Delete
var nonEmptyBlocks, walker;
[1828] Fix | Delete
if (node.nodeType === 3 && (isForward ? offset < node.data.length : offset > 0)) {
[1829] Fix | Delete
return node;
[1830] Fix | Delete
}
[1831] Fix | Delete
nonEmptyBlocks = editor.schema.getNonEmptyElements();
[1832] Fix | Delete
if (node.nodeType === 1) {
[1833] Fix | Delete
node = global$1.getNode(node, offset);
[1834] Fix | Delete
}
[1835] Fix | Delete
walker = new global$2(node, root);
[1836] Fix | Delete
if (isForward) {
[1837] Fix | Delete
if (NodeType.isBogusBr(editor.dom, node)) {
[1838] Fix | Delete
walker.next();
[1839] Fix | Delete
}
[1840] Fix | Delete
}
[1841] Fix | Delete
while (node = walker[isForward ? 'next' : 'prev2']()) {
[1842] Fix | Delete
if (node.nodeName === 'LI' && !node.hasChildNodes()) {
[1843] Fix | Delete
return node;
[1844] Fix | Delete
}
[1845] Fix | Delete
if (nonEmptyBlocks[node.nodeName]) {
[1846] Fix | Delete
return node;
[1847] Fix | Delete
}
[1848] Fix | Delete
if (node.nodeType === 3 && node.data.length > 0) {
[1849] Fix | Delete
return node;
[1850] Fix | Delete
}
[1851] Fix | Delete
}
[1852] Fix | Delete
};
[1853] Fix | Delete
var hasOnlyOneBlockChild = function (dom, elm) {
[1854] Fix | Delete
var childNodes = elm.childNodes;
[1855] Fix | Delete
return childNodes.length === 1 && !NodeType.isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
[1856] Fix | Delete
};
[1857] Fix | Delete
var unwrapSingleBlockChild = function (dom, elm) {
[1858] Fix | Delete
if (hasOnlyOneBlockChild(dom, elm)) {
[1859] Fix | Delete
dom.remove(elm.firstChild, true);
[1860] Fix | Delete
}
[1861] Fix | Delete
};
[1862] Fix | Delete
var moveChildren = function (dom, fromElm, toElm) {
[1863] Fix | Delete
var node, targetElm;
[1864] Fix | Delete
targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
[1865] Fix | Delete
unwrapSingleBlockChild(dom, fromElm);
[1866] Fix | Delete
if (!NodeType.isEmpty(dom, fromElm, true)) {
[1867] Fix | Delete
while (node = fromElm.firstChild) {
[1868] Fix | Delete
targetElm.appendChild(node);
[1869] Fix | Delete
}
[1870] Fix | Delete
}
[1871] Fix | Delete
};
[1872] Fix | Delete
var mergeLiElements = function (dom, fromElm, toElm) {
[1873] Fix | Delete
var node, listNode;
[1874] Fix | Delete
var ul = fromElm.parentNode;
[1875] Fix | Delete
if (!NodeType.isChildOfBody(dom, fromElm) || !NodeType.isChildOfBody(dom, toElm)) {
[1876] Fix | Delete
return;
[1877] Fix | Delete
}
[1878] Fix | Delete
if (NodeType.isListNode(toElm.lastChild)) {
[1879] Fix | Delete
listNode = toElm.lastChild;
[1880] Fix | Delete
}
[1881] Fix | Delete
if (ul === toElm.lastChild) {
[1882] Fix | Delete
if (NodeType.isBr(ul.previousSibling)) {
[1883] Fix | Delete
dom.remove(ul.previousSibling);
[1884] Fix | Delete
}
[1885] Fix | Delete
}
[1886] Fix | Delete
node = toElm.lastChild;
[1887] Fix | Delete
if (node && NodeType.isBr(node) && fromElm.hasChildNodes()) {
[1888] Fix | Delete
dom.remove(node);
[1889] Fix | Delete
}
[1890] Fix | Delete
if (NodeType.isEmpty(dom, toElm, true)) {
[1891] Fix | Delete
dom.$(toElm).empty();
[1892] Fix | Delete
}
[1893] Fix | Delete
moveChildren(dom, fromElm, toElm);
[1894] Fix | Delete
if (listNode) {
[1895] Fix | Delete
toElm.appendChild(listNode);
[1896] Fix | Delete
}
[1897] Fix | Delete
var contains = contains$1(Element.fromDom(toElm), Element.fromDom(fromElm));
[1898] Fix | Delete
var nestedLists = contains ? dom.getParents(fromElm, NodeType.isListNode, toElm) : [];
[1899] Fix | Delete
dom.remove(fromElm);
[1900] Fix | Delete
each(nestedLists, function (list) {
[1901] Fix | Delete
if (NodeType.isEmpty(dom, list) && list !== dom.getRoot()) {
[1902] Fix | Delete
dom.remove(list);
[1903] Fix | Delete
}
[1904] Fix | Delete
});
[1905] Fix | Delete
};
[1906] Fix | Delete
var mergeIntoEmptyLi = function (editor, fromLi, toLi) {
[1907] Fix | Delete
editor.dom.$(toLi).empty();
[1908] Fix | Delete
mergeLiElements(editor.dom, fromLi, toLi);
[1909] Fix | Delete
editor.selection.setCursorLocation(toLi);
[1910] Fix | Delete
};
[1911] Fix | Delete
var mergeForward = function (editor, rng, fromLi, toLi) {
[1912] Fix | Delete
var dom = editor.dom;
[1913] Fix | Delete
if (dom.isEmpty(toLi)) {
[1914] Fix | Delete
mergeIntoEmptyLi(editor, fromLi, toLi);
[1915] Fix | Delete
} else {
[1916] Fix | Delete
var bookmark = Bookmark.createBookmark(rng);
[1917] Fix | Delete
mergeLiElements(dom, fromLi, toLi);
[1918] Fix | Delete
editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
[1919] Fix | Delete
}
[1920] Fix | Delete
};
[1921] Fix | Delete
var mergeBackward = function (editor, rng, fromLi, toLi) {
[1922] Fix | Delete
var bookmark = Bookmark.createBookmark(rng);
[1923] Fix | Delete
mergeLiElements(editor.dom, fromLi, toLi);
[1924] Fix | Delete
var resolvedBookmark = Bookmark.resolveBookmark(bookmark);
[1925] Fix | Delete
editor.selection.setRng(resolvedBookmark);
[1926] Fix | Delete
};
[1927] Fix | Delete
var backspaceDeleteFromListToListCaret = function (editor, isForward) {
[1928] Fix | Delete
var dom = editor.dom, selection = editor.selection;
[1929] Fix | Delete
var selectionStartElm = selection.getStart();
[1930] Fix | Delete
var root = Selection.getClosestListRootElm(editor, selectionStartElm);
[1931] Fix | Delete
var li = dom.getParent(selection.getStart(), 'LI', root);
[1932] Fix | Delete
var ul, rng, otherLi;
[1933] Fix | Delete
if (li) {
[1934] Fix | Delete
ul = li.parentNode;
[1935] Fix | Delete
if (ul === editor.getBody() && NodeType.isEmpty(dom, ul)) {
[1936] Fix | Delete
return true;
[1937] Fix | Delete
}
[1938] Fix | Delete
rng = Range.normalizeRange(selection.getRng(true));
[1939] Fix | Delete
otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
[1940] Fix | Delete
if (otherLi && otherLi !== li) {
[1941] Fix | Delete
if (isForward) {
[1942] Fix | Delete
mergeForward(editor, rng, otherLi, li);
[1943] Fix | Delete
} else {
[1944] Fix | Delete
mergeBackward(editor, rng, li, otherLi);
[1945] Fix | Delete
}
[1946] Fix | Delete
return true;
[1947] Fix | Delete
} else if (!otherLi) {
[1948] Fix | Delete
if (!isForward) {
[1949] Fix | Delete
flattenListSelection(editor);
[1950] Fix | Delete
return true;
[1951] Fix | Delete
}
[1952] Fix | Delete
}
[1953] Fix | Delete
}
[1954] Fix | Delete
return false;
[1955] Fix | Delete
};
[1956] Fix | Delete
var removeBlock = function (dom, block, root) {
[1957] Fix | Delete
var parentBlock = dom.getParent(block.parentNode, dom.isBlock, root);
[1958] Fix | Delete
dom.remove(block);
[1959] Fix | Delete
if (parentBlock && dom.isEmpty(parentBlock)) {
[1960] Fix | Delete
dom.remove(parentBlock);
[1961] Fix | Delete
}
[1962] Fix | Delete
};
[1963] Fix | Delete
var backspaceDeleteIntoListCaret = function (editor, isForward) {
[1964] Fix | Delete
var dom = editor.dom;
[1965] Fix | Delete
var selectionStartElm = editor.selection.getStart();
[1966] Fix | Delete
var root = Selection.getClosestListRootElm(editor, selectionStartElm);
[1967] Fix | Delete
var block = dom.getParent(selectionStartElm, dom.isBlock, root);
[1968] Fix | Delete
if (block && dom.isEmpty(block)) {
[1969] Fix | Delete
var rng = Range.normalizeRange(editor.selection.getRng(true));
[1970] Fix | Delete
var otherLi_1 = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
[1971] Fix | Delete
if (otherLi_1) {
[1972] Fix | Delete
editor.undoManager.transact(function () {
[1973] Fix | Delete
removeBlock(dom, block, root);
[1974] Fix | Delete
ToggleList.mergeWithAdjacentLists(dom, otherLi_1.parentNode);
[1975] Fix | Delete
editor.selection.select(otherLi_1, true);
[1976] Fix | Delete
editor.selection.collapse(isForward);
[1977] Fix | Delete
});
[1978] Fix | Delete
return true;
[1979] Fix | Delete
}
[1980] Fix | Delete
}
[1981] Fix | Delete
return false;
[1982] Fix | Delete
};
[1983] Fix | Delete
var backspaceDeleteCaret = function (editor, isForward) {
[1984] Fix | Delete
return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward);
[1985] Fix | Delete
};
[1986] Fix | Delete
var backspaceDeleteRange = function (editor) {
[1987] Fix | Delete
var selectionStartElm = editor.selection.getStart();
[1988] Fix | Delete
var root = Selection.getClosestListRootElm(editor, selectionStartElm);
[1989] Fix | Delete
var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
[1990] Fix | Delete
if (startListParent || Selection.getSelectedListItems(editor).length > 0) {
[1991] Fix | Delete
editor.undoManager.transact(function () {
[1992] Fix | Delete
editor.execCommand('Delete');
[1993] Fix | Delete
NormalizeLists.normalizeLists(editor.dom, editor.getBody());
[1994] Fix | Delete
});
[1995] Fix | Delete
return true;
[1996] Fix | Delete
}
[1997] Fix | Delete
return false;
[1998] Fix | Delete
};
[1999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function