Vanessa 2024-03-31 11:15:33 +08:00
parent 8853b9a192
commit cfe93a0acc

View File

@ -17,8 +17,12 @@ import {isIPad, setStorageVal} from "../util/compatibility";
import {mathRender} from "../render/mathRender";
import {isMobile} from "../../util/functions";
import {processRender} from "../util/processCode";
import {hasClosestByClassName} from "../util/hasClosest";
export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle) => {
if (hasClosestByClassName(blockElement, "protyle-wysiwyg__embed")) {
return;
}
const disableElement = isNotEditBlock(blockElement);
if (!disableElement && blockElement.classList.contains("protyle-wysiwyg--select")) {
setLastNodeRange(getContenteditableElement(blockElement), range, false);