BlockSuite API Documentation / @blocksuite/affine-block-root / LinkedWidgetConfig
Interface: LinkedWidgetConfig
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:27
Properties
autoFocusedItemKey()?
optionalautoFocusedItemKey: (menus,query,currentActiveKey,editorHost,inlineEditor) =>null|string
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:58
Auto focused item
Will be called when the menu is
- opened
- query changed
- menu group or its items changed
If the return value is not null, no action will be taken.
Parameters
menus
query
string
currentActiveKey
null | string
editorHost
inlineEditor
Returns
null | string
convertTriggerKey
convertTriggerKey:
boolean
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:37
Convert trigger key to primary key (the first item of the trigger keys) [[ -> @
getMenus()
getMenus: (
query,abort,editorHost,inlineEditor,abortSignal) =>LinkedMenuGroup[] |Promise<LinkedMenuGroup[]>
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:40
Parameters
query
string
abort
() => void
editorHost
inlineEditor
abortSignal
AbortSignal
Returns
LinkedMenuGroup[] | Promise<LinkedMenuGroup[]>
ignoreBlockTypes
ignoreBlockTypes:
string[]
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:38
ignoreSelector
ignoreSelector:
string
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:39
mobile
mobile:
object
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:66
scrollContainer?
optionalscrollContainer:string|HTMLElement|Window
The linked doc menu widget will scroll the container to make sure the input cursor is visible in viewport. It accepts a selector string, HTMLElement or Window
Default
getViewportElement(editorHost) this is the scrollable container in playgroundscrollTopOffset?
optionalscrollTopOffset:number| () =>number
The offset between the top of viewport and the input cursor
Default
46 The height of header in playgroundtriggerKeys
triggerKeys: [
string,...string[]]
Defined in: packages/affine/blocks/block-root/src/widgets/linked-doc/config.ts:32
The first item of the trigger keys will be the primary key e.g. @, [[