|
@@ -63,14 +63,14 @@ export const genSBElement = (layout: string, id?: string, attrHTML?: string) =>
|
|
export const jumpToParentNext = (protyle:IProtyle,nodeElement: Element) => {
|
|
export const jumpToParentNext = (protyle:IProtyle,nodeElement: Element) => {
|
|
const topElement = getTopAloneElement(nodeElement);
|
|
const topElement = getTopAloneElement(nodeElement);
|
|
if (topElement) {
|
|
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) {
|
|
if (nextElement) {
|
|
- focusBlock(nextElement)
|
|
|
|
|
|
+ focusBlock(nextElement);
|
|
scrollCenter(protyle, nextElement);
|
|
scrollCenter(protyle, nextElement);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+};
|
|
|
|
|
|
export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id?: string) => {
|
|
export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id?: string) => {
|
|
const range = getEditorRange(protyle.wysiwyg.element);
|
|
const range = getEditorRange(protyle.wysiwyg.element);
|