This commit is contained in:
Vanessa 2022-06-27 23:48:24 +08:00
parent c88b9b109b
commit d8a45b41ee
5 changed files with 150 additions and 118 deletions

View file

@ -1,5 +1,6 @@
import {getContenteditableElement, getNextBlock, getPreviousBlock, hasPreviousSibling} from "../wysiwyg/getBlock";
import {hasClosestByMatchTag} from "./hasClosest";
import {countSelectWord} from "../../layout/status";
const selectIsEditor = (editor: Element, range?: Range) => {
if (!range) {
@ -26,6 +27,7 @@ export const selectAll = (protyle: IProtyle, nodeElement: Element, range: Range)
range.setStart(cellElement.firstChild, 0);
range.setEndAfter(cellElement.lastChild);
protyle.toolbar.render(protyle, range);
countSelectWord(range);
return true;
}
}
@ -68,6 +70,7 @@ export const selectAll = (protyle: IProtyle, nodeElement: Element, range: Range)
}
}
protyle.toolbar.render(protyle, range);
countSelectWord(range);
return true;
}
}