@mocanvas/editor · function
declare function useEditorPortalHost(): HTMLElement | nullWhere floating layers are portalled to.
SEMANTICS-ASSUMED: the host is the container itself rather than a dedicated child node. Portalling into the container keeps a menu inside the editor's stacking and theming context (the CSS custom properties are set on the container), which is the property that makes portalling worth doing at all; a separate host node would have to be created and torn down in lockstep with the container for no additional benefit.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.