This commit is contained in:
Vanessa 2022-07-31 10:18:05 +08:00
parent 6b64a031f0
commit 88c666b723
8 changed files with 11 additions and 11 deletions

View file

@ -63,14 +63,14 @@ export const genSBElement = (layout: string, id?: string, attrHTML?: string) =>
export const jumpToParentNext = (protyle:IProtyle,nodeElement: Element) => {
const topElement = getTopAloneElement(nodeElement);
if (topElement) {
const topParentElement = hasClosestByClassName(topElement, "list") || hasClosestByClassName(topElement, "bq") || hasClosestByClassName(topElement, "sb") || topElement
const nextElement = getNextBlock(topParentElement)
const topParentElement = hasClosestByClassName(topElement, "list") || hasClosestByClassName(topElement, "bq") || hasClosestByClassName(topElement, "sb") || topElement;
const nextElement = getNextBlock(topParentElement);
if (nextElement) {
focusBlock(nextElement)
focusBlock(nextElement);
scrollCenter(protyle, nextElement);
}
}
}
};
export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id?: string) => {
const range = getEditorRange(protyle.wysiwyg.element);