Comments (5)
I was thinking about this and I thought that maybe it would not be cool to select the hole link to edit it. My idea is to add some event listener attached to all links (maybe a click or a mouse over). When this event is dispatched, the editor have to display two options: follow link and edit link (this one does what you asked for).
What do you think about it?
from medium-editor.
In "edit mode", I do not know any editor (any widely used one, at least) that allows following a link. I wouldn't see the purpose of this, IMO. On top of that, it would only add more mouse clicks to be able to edit the link, and the goal of all UIs is to simplify user experience in an ever increasingly complex environments.
If your idea is to be able to test the URL, then perhaps adding a button at the far right side of the input field (right next to the "X" / clear button) could load up the URL in a new tab or, if it's a anchor tag (begins with #
), scroll down to the bookmark anchor. Having this button would require only 3 mouse clicks to test any given link, which is totally acceptable : 1) select text, 2) click the #
toolbar button, and 3) test link after reviewing it.
Think of what is the most used feature, and testing a link has a lower priority than edit it's value, therefore you should not add intermediate steps to accommodate things like this.
As an added "bunus", if the link starts with a hash tag, scrolling to the bookmark anchor could select the anchor and display two controls : "Go back" to the referring link that brought the user here and "Edit" (which would display the "normal" toolbar.
BTW : this anchor tag idea, I am assuming that this is why you have à #
to represent a link, to treat anchors as both an "on page" link or "external link" with the same button; then how do you create a <a name="anchorName">
element?
from medium-editor.
You can always open a link with command-click or middle click (whatever opens in another tab). This works. So you can test links with that, but if you directly click you would get into the edit mode.
I think anchor links are a special case here. I would first like that this works for normal links. So I would suggest user experience is like this, after user creates a link:
- if user clicks on the link, editor for the link is opened
- if user middle clicks on the link, a new tab for the link is opened
- when user hovers over the link in the edit mode, a small arrow popups to the right of the link for user to follow the link
The issue with the last approach is that user might follow the link and loose all the content. So there should be two things:
- user should get a warning about leaving unsaved content
- user can middle click that arrow to open in another tab
from medium-editor.
In "edit mode", I do not know any editor (any widely used one, at least) that allows following a link.
Google Docs have a good implementation. On click you get:
If your idea is to be able to test the URL, then perhaps adding a button at the far right side of the input field
Like this approach.
Having this button would require only 3 mouse clicks to test any given link, which is totally acceptable : 1) select text, 2) click the # toolbar button, and 3) test link after reviewing it.
I would make it two clicks. If you click/select a link you get a "link edit mode" straight away.
from medium-editor.
Fixed by PR #152
from medium-editor.
Related Issues (20)
- Toolbar not showing on selecting text.
- Allow linebreaks instead of paragraphs for copy-pasted code HOT 2
- Import for sveltekit HOT 1
- uploadCompleted option issue
- Handling bi-directional text RTL mixed with LTR HOT 3
- Update your list of plugins
- Usage with React? HOT 3
- Use inside `ShadowRoot`: Framework LitElement
- No placeholder on elements added to editor
- Can't add images HOT 1
- Let H1 - H6 Button Icons work with fontawesome v5 & v6
- How to disable undo/redo ?
- Is it possible to reduce the amount of times a user can 'Indent'
- Duplication of First letter in Korean
- Any way to add photo through plus button like medium??
- Is there a way to always show the plus icon for the new line instead of on hovering? HOT 1
- paste with cleanPastedHTML=true dont keep line break
- Project Status HOT 3
- value goes missing when we style it second time in iframe
- Question: Is it possbile to have two toolbars on the same class? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medium-editor.