GithubHelp home page GithubHelp logo

Edit links about medium-editor HOT 5 CLOSED

yabwe avatar yabwe commented on August 22, 2024
Edit links

from medium-editor.

Comments (5)

wmartins avatar wmartins commented on August 22, 2024

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.

yanickrochon avatar yanickrochon commented on August 22, 2024

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.

mitar avatar mitar commented on August 22, 2024

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.

websirnik avatar websirnik commented on August 22, 2024

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.

daviferreira avatar daviferreira commented on August 22, 2024

Fixed by PR #152

from medium-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.