@mocanvas/editor · function

EditorPortal

declare function EditorPortal({ container, children }: EditorPortalProps): react.JSX.Element

Renders children into the editor's container rather than in place.

Chrome that has to escape an ancestor's overflow: hidden or transform — every popover, tooltip and menu — goes through here. With no container available the children are rendered in place instead of thrown away, so a component using it still renders in a test or a server render.

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.