Add mentions feature to objects in notes (#16373)
Issue #15755 ### Context As shown in the issue, users should be able to @ objects and have it be linked to their associated page. ### Changes Made - Updated the BlockNote schema to include the newly created MentionInlineContent that displays an object using a RecordChip - Added the UI for the menu that appears to select the requested object (similar to this example: https://www.blocknotejs.org/examples/ui-components/suggestion-menus-slash-menu-component) - Added a hook to retrieve the data for the UI - Added the @ trigger to the block editor ### Result https://github.com/user-attachments/assets/87dae6a2-ad7a-4642-80b2-8b1751feae24 --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+8
-8
@@ -56,15 +56,15 @@ export const DropdownMenuItemsContainer = ({
|
||||
scrollable?: boolean;
|
||||
}) => {
|
||||
return scrollable === true ? (
|
||||
<StyledScrollableContainer
|
||||
maxHeight={
|
||||
hasMaxHeight ? DROPDOWN_MENU_ITEMS_CONTAINER_MAX_HEIGHT : undefined
|
||||
}
|
||||
>
|
||||
<StyledExternalContainer role="listbox">
|
||||
<StyledExternalContainer role="listbox">
|
||||
<StyledScrollableContainer
|
||||
maxHeight={
|
||||
hasMaxHeight ? DROPDOWN_MENU_ITEMS_CONTAINER_MAX_HEIGHT : undefined
|
||||
}
|
||||
>
|
||||
<StyledInternalContainer>{children}</StyledInternalContainer>
|
||||
</StyledExternalContainer>
|
||||
</StyledScrollableContainer>
|
||||
</StyledScrollableContainer>
|
||||
</StyledExternalContainer>
|
||||
) : (
|
||||
<StyledExternalContainer role="listbox">
|
||||
<StyledInternalContainer>{children}</StyledInternalContainer>
|
||||
|
||||
Reference in New Issue
Block a user