Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-23 23:22:18 +08:00
parent 58f72678ae
commit be233229a9
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 73 additions and 29 deletions

View file

@ -6,7 +6,7 @@ import {blockRender} from "../render/blockRender";
import {processRender} from "../util/processCode";
import {highlightRender} from "../render/highlightRender";
import {hasClosestBlock, hasClosestByAttribute, hasTopClosestByAttribute, isInEmbedBlock} from "../util/hasClosest";
import {setFold, zoomOut} from "../../menus/protyle";
import {zoomOut} from "../../menus/protyle";
import {disabledProtyle, enableProtyle, onGet} from "../util/onGet";
/// #if !MOBILE
import {getAllModels} from "../../layout/getAll";
@ -1061,10 +1061,6 @@ export const turnsIntoTransaction = (options: {
const undoOperations: IOperation[] = [];
let previousId: string;
selectsElement.forEach((item, index) => {
if ((options.type === "Blocks2Ps" || options.type === "Blocks2Hs") &&
item.getAttribute("data-type") === "NodeHeading" && item.getAttribute("fold") === "1") {
setFold(options.protyle, item, undefined, undefined, false);
}
item.classList.remove("protyle-wysiwyg--select");
item.removeAttribute("select-start");
item.removeAttribute("select-end");