Feat: Add Link Functionality.#174
Open
ayushnirwal wants to merge 8 commits intofeat/text-editor-migratefrom
Open
Feat: Add Link Functionality.#174ayushnirwal wants to merge 8 commits intofeat/text-editor-migratefrom
ayushnirwal wants to merge 8 commits intofeat/text-editor-migratefrom
Conversation
4 tasks
46f510e to
0402aa1
Compare
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
19e9409 to
326c5d0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds link editing functionality to the text editor component, including a bubble menu for editing link URLs and a toolbar button for creating links.
Changes:
- Added LinkBubbleMenu component to display a popup editor when links are selected
- Added "link" command to the text editor toolbar
- Updated TypeScript configuration to use bundler module resolution
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/frappe-ui-react/tsconfig.json | Added bundler module resolution for improved module handling |
| packages/frappe-ui-react/src/components/textEditor/textEditor.tsx | Integrated LinkBubbleMenu component into the editor |
| packages/frappe-ui-react/src/components/textEditor/menu/menu.tsx | Added link command to the default toolbar commands |
| packages/frappe-ui-react/src/components/textEditor/menu/linkBubbleMenu.tsx | New component implementing link editing bubble menu with URL input and remove functionality |
| packages/frappe-ui-react/src/components/textEditor/menu/commands/types.ts | Added "link" to the command keys type definition |
| packages/frappe-ui-react/src/components/textEditor/menu/commands/index.ts | Implemented link command with Link2 icon and setLink action |
| packages/frappe-ui-react/package.json | Reordered dependencies (unintentional formatting change) |
Comments suppressed due to low confidence (1)
packages/frappe-ui-react/package.json:58
- The '@tiptap/extension-link' package is missing from dependencies. This package needs to be added to make the link functionality work. Add "@tiptap/extension-link": "^3.17.1" to the dependencies section.
"@headlessui/react": "^2.2.9",
"@popperjs/core": "^2.11.8",
"@tailwindcss/typography": "^0.5.19",
"@tiptap/extension-blockquote": "^3.17.1",
"@tiptap/extension-code-block-lowlight": "^3.17.1",
"@tiptap/extension-highlight": "^3.17.1",
"@tiptap/extension-horizontal-rule": "^3.17.1",
"@tiptap/extension-list": "^3.17.1",
"@tiptap/extension-placeholder": "^3.17.1",
"@tiptap/extension-strike": "^3.17.1",
"@tiptap/extension-table": "^3.17.1",
"@tiptap/extension-task-list": "^3.17.1",
"@tiptap/extension-text-align": "^3.17.1",
"@tiptap/extension-text-style": "^3.17.1",
"@tiptap/pm": "^3.17.1",
"@tiptap/react": "^3.17.1",
"@tiptap/starter-kit": "^3.17.1",
packages/frappe-ui-react/src/components/textEditor/menu/linkBubbleMenu.tsx
Outdated
Show resolved
Hide resolved
packages/frappe-ui-react/src/components/textEditor/menu/linkBubbleMenu.tsx
Show resolved
Hide resolved
packages/frappe-ui-react/src/components/textEditor/menu/linkBubbleMenu.tsx
Show resolved
Hide resolved
packages/frappe-ui-react/src/components/textEditor/menu/linkBubbleMenu.tsx
Outdated
Show resolved
Hide resolved
packages/frappe-ui-react/src/components/textEditor/menu/linkBubbleMenu.tsx
Outdated
Show resolved
Hide resolved
packages/frappe-ui-react/src/components/textEditor/menu/commands/index.ts
Show resolved
Hide resolved
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
b1ink0
requested changes
Feb 6, 2026
packages/frappe-ui-react/src/components/textEditor/menu/menu.tsx
Outdated
Show resolved
Hide resolved
|
|
||
| return ( | ||
| <EditorContext.Provider value={{ editor }}> | ||
| <LinkBubbleMenu /> |
Collaborator
There was a problem hiding this comment.
When clicking on the link, it opens directly. This behavior is different from frappe-ui, where a popup appears with options to click or edit the link. I think that approach is better, as accidentally clicking the link while editing opens a new tab. Overall, I don’t think the current UX is good.
packages/frappe-ui-react/src/components/textEditor/menu/linkBubbleMenu.tsx
Show resolved
Hide resolved
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
Signed-off-by: ayushnirwal <53055971+ayushnirwal@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add link editing functionality
Screenshot/Screencast
Screen.Recording.2026-01-27.at.1.45.57.PM.mov
Checklist