Create and edit links in the Content Editor
Problem to solve
In order to support the full CommonMark spec, the Content Editor must be support rendering and editing all the elements of the standard implementation .
Here, we are focused on creating text links.
Intended users
- Parker (Product Manager)
- Presley (Product Designer)
- Sasha (Software Developer)
- Eddie (Content Editor)
User experience goal
The user should be able to create and edit links in the Content Editor.
Proposal
Create an extension for the Content Editor that supports editing links.
- An icon should be displayed in the toolbar. The toolbar icon will create a link at the current cursor's position.
- Any selected text will be used as the display text
- The toolbar icond should reflect the state of the currently selected span of content. If the content is mixed (for example, the selected characters contain a link and some regular text) then we should indicate the inactive state.
- Custom UI will allow for the link's
URL
anddisplay text
to be defined or edited. - Any plain URL that's pasted into the editor that is not surrounded by backticks should automatically become a link using the URL as the display text.
Details
Extensions to the Content Editor require a few specific details:
Input Rule |
[display text](url) or http://website.com
|
Paste Rule | [paste_rule] |
Toolbar Button | https://gitlab.com/gitlab-org/gitlab-svgs/blob/main/sprite_icons/link.svg |
Keyboard Shortcut | CMD/CTRL + K |
Instrumentation | [event_name] |
Documentation
Availability & Testing
Available Tier
This feature, as with the content editor itself, is available on both SaaS and Self-managed Free tiers
What does success look like, and how can we measure that?
An event should be added to track creation of a new link node through the UI. We aren't interested in tracking every instance of links in existing content, but it would be great to know how often this extension is invoked through the editor, and whether it is done by using the toolbar, keyboard shortcut, or by typing directly into the editor.
What is the type of buyer?
Is this a cross-stage feature?
Links / references
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.