mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-12 23:21:23 +08:00
This commit is contained in:
parent
8853b9a192
commit
cfe93a0acc
@ -17,8 +17,12 @@ import {isIPad, setStorageVal} from "../util/compatibility";
|
|||||||
import {mathRender} from "../render/mathRender";
|
import {mathRender} from "../render/mathRender";
|
||||||
import {isMobile} from "../../util/functions";
|
import {isMobile} from "../../util/functions";
|
||||||
import {processRender} from "../util/processCode";
|
import {processRender} from "../util/processCode";
|
||||||
|
import {hasClosestByClassName} from "../util/hasClosest";
|
||||||
|
|
||||||
export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle) => {
|
export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle) => {
|
||||||
|
if (hasClosestByClassName(blockElement, "protyle-wysiwyg__embed")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const disableElement = isNotEditBlock(blockElement);
|
const disableElement = isNotEditBlock(blockElement);
|
||||||
if (!disableElement && blockElement.classList.contains("protyle-wysiwyg--select")) {
|
if (!disableElement && blockElement.classList.contains("protyle-wysiwyg--select")) {
|
||||||
setLastNodeRange(getContenteditableElement(blockElement), range, false);
|
setLastNodeRange(getContenteditableElement(blockElement), range, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user