UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

13 lines (12 loc) 512 B
//#region src/EditorSlashMenu/utils.ts const isGroup = (entry) => Boolean(entry.items && Array.isArray(entry.items)); const isEditableTarget = (target) => { if (!(target instanceof HTMLElement)) return false; if (target.isContentEditable) return true; const tag = target.tagName; if (tag === "INPUT" || tag === "TEXTAREA") return !target.readOnly && !target.disabled; return target.getAttribute("role") === "textbox"; }; //#endregion export { isEditableTarget, isGroup }; //# sourceMappingURL=utils.mjs.map