🐛 页面定位
This commit is contained in:
parent
0ccbea7768
commit
a82fde6598
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,10 @@ import {blockRender} from "../markdown/blockRender";
|
|||
import {disabledProtyle, enableProtyle} from "../util/onGet";
|
||||
|
||||
export const saveScroll = (protyle: IProtyle, getObject = false) => {
|
||||
if (!protyle.wysiwyg.element.firstElementChild) {
|
||||
// 报错或者空白页面
|
||||
return undefined;
|
||||
}
|
||||
const attr: IScrollAttr = {
|
||||
startId: protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-id"),
|
||||
endId: protyle.wysiwyg.element.lastElementChild.getAttribute("data-node-id"),
|
||||
|
|
Loading…
Add table
Reference in a new issue