mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 19:30:16 +01:00
🎨 Clean code
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
5550f89ed8
commit
cea9d1b837
2 changed files with 4 additions and 4 deletions
|
|
@ -17,11 +17,11 @@ export const canInput = (element: Element) => {
|
|||
element.tagName === "TEXTAREA" ||
|
||||
(element.tagName === "INPUT" && ["email", "number", "password", "search", "tel", "text", "url", "", null].includes(element.getAttribute("type")))
|
||||
) && element.getAttribute("readonly") !== "readonly") {
|
||||
return element
|
||||
return element;
|
||||
}
|
||||
const wysisygElement = hasClosestByClassName(element, "protyle-wysiwyg", true);
|
||||
if (wysisygElement && wysisygElement.getAttribute("data-readonly") === "false") {
|
||||
return hasClosestByAttribute(element, "contenteditable", "true")
|
||||
return hasClosestByAttribute(element, "contenteditable", "true");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue