Repository navigation
Links: an editor for a link's words and where it goes, which also finds pages - #214
Merged
Merged
Conversation
…ds pages The browser prompt (one box: the address) is replaced by a link editor with Text and Link, opened from the toolbar, "/link" or ⌘K (with words chosen or the cursor in a link; otherwise ⌘K is still search). The Link box searches pages: a link to one opens it here, not in a new tab. Unsafe addresses are refused, the link stays on its words while others edit, and links no longer take in what's typed after them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Links were added with the browser's prompt: one box, for the address. The slash menu's "Link" used the address itself as the link's words, and clicking any link opened it in a new tab, Wikid pages included.
The link editor (
LinkEditor.vue)/link, or ⌘/Ctrl+K. ⌘K opens it when words are chosen or the cursor is in a link. Otherwise ⌘K stays the app's search: it used to open both, with search on top. The app's search shortcut now skips a key the editor has already taken./linktyped straight after one, make a new link./doc/<id>, keeping any#block-….mailto:,tel:and places on this site are taken.javascript:and the like are refused, with a message.aria-activedescendant. Escape closes the list of pages, then the editor. Tab goes round inside it.Where the link goes
Clicking links
workspace.openPageFromLink: loaded if it isn't in the list, or a word on why it can't be opened). Other links open in a new tab.Links keep their words. Links are no longer
inclusive. With autolink, Tiptap had a link take in what was typed at its end: the next word joined it, and a space was lost.Also changed
/doc/address parser (pageLinkTarget, inutils/editorLinks.js) is shared by the click handler and the link editor.Tests:
e2e/links.spec.ts, 11 tests:/linkadds a link with its own words, and typing goes on after it;javascript:is refused;Page mentions (@ / [[) come next, in their own PR.
🤖 Generated with Claude Code