Skip to content

prosekit/web/inline-popover

InlinePopoverElement

Renames and re-exports InlinePopover

InlinePopoverProps

Extends

  • Omit<OverlayPositionerProps, "placement" | "offset">

Properties

defaultOpen

defaultOpen: boolean

Whether the popover is open by default when some inline content is selected.

When defaultOpen is true, the popover will open or close based on the inline selection. When defaultOpen is false, the popover will never be opened unless the open prop is true.

Default
ts
true

dismissOnEscape

dismissOnEscape: boolean

Whether the inline popover should be dismissed when the editor receives an Escape key press.

Default
ts
true

editor

editor: null | Editor<any>

The ProseKit editor instance.

Default
ts
null

flip

flip: boolean | Placement[]

Default
ts
true
Overrides

Omit.flip

hide

hide: boolean

Default
ts
true
Overrides

Omit.hide

hoist

hoist: boolean

Default
ts
true
Overrides

Omit.hoist

inline

inline: boolean

Default
ts
true
Overrides

Omit.inline

offset

offset: null | OffsetOptions

Default
ts
12

onOpenChange

onOpenChange: null | (open) => void

Event handler called when the open state changed caused by user interaction (i.e. select or unselect inline content).

Default
ts
null

open

open: boolean

Whether the popover is open.

Notice that the popover will be always hidden if the inline selection is empty.

Default
ts
false

overlap

overlap: boolean

Default
ts
true
Overrides

Omit.overlap

placement

placement: Placement

The placement of the popover, relative to the selected inline content.

Default
ts
"top"

defaultInlinePopoverProps

const defaultInlinePopoverProps: Readonly<object>

Type declaration

NameTypeDefault value
boundarynever[][]
defaultOpentruetrue
dismissOnEscapetruetrue
editornullnull
fliptruetrue
hidetruetrue
hoisttruetrue
inlinetruetrue
offset1212
onOpenChangenullnull
openfalsefalse
overflowPadding88
overlaptruetrue
placement"top"'top'
shifttruetrue