mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 09:46:10 +01:00
This commit is contained in:
parent
0d69dc614b
commit
58f72678ae
1 changed files with 5 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import {transaction, turnsIntoOneTransaction, updateTransaction} from "./transac
|
|||
import {genEmptyBlock} from "../../block/util";
|
||||
import * as dayjs from "dayjs";
|
||||
import {Constants} from "../../constants";
|
||||
import {moveToPrevious} from "./remove";
|
||||
import {moveToPrevious, removeBlock} from "./remove";
|
||||
import {hasClosestByClassName} from "../util/hasClosest";
|
||||
import {setFold} from "../../menus/protyle";
|
||||
|
||||
|
|
@ -219,6 +219,10 @@ export const listIndent = (protyle: IProtyle, liItemElements: Element[], range:
|
|||
|
||||
export const breakList = (protyle: IProtyle, blockElement: Element, range: Range) => {
|
||||
const listItemElement = blockElement.parentElement;
|
||||
if (!listItemElement.previousElementSibling) {
|
||||
removeBlock(protyle, blockElement, range, "Backspace");
|
||||
return;
|
||||
}
|
||||
const listItemId = listItemElement.getAttribute("data-node-id");
|
||||
const doOperations: IOperation[] = [];
|
||||
const undoOperations: IOperation[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue