WMBHnQSLXBGAllA.webp

When drafting a new post or comment, the top of the text box has a bunch of useful buttons (Bold, Italic, etc.). One of them is the “Image” button, which places the string ![](https://) in the textbox and moves the cursor within the square brackets. This is actually a little annoying to me, as any time I use this button, I always have a full URL already copied to my clipboard, meaning that I have to remove the https:// part before pasting the URL. I would prefer it to just not have anything between the parentheses at all. Furthermore, I would prefer the cursor to be automatically placed in between the parentheses, not in between the square brackets. Lastly, there is an extra space character added before the exclamation point that I always find myself having to remove. As a more advanced user, this button is fairly useless to me. Every time I use it, I ask myself if it would have been quicker and less effort to just manually type ![]().

In all, the changes I am requesting:

  1. Do not include anything between the parentheses
  2. Do not include the space character at the beginning
  3. Automatically place the cursor between the parentheses

If these changes were made, I could see myself actually using that button often.

With all that said, I do understand that there are benefits to the current behaviour for most users. For users who might not be too familiar with Markdown, having the https:// there makes it very obvious where the URL is supposed to go, and removing/replacing that bit is really not all that difficult for a user to do. Placing the cursor in the square brackets also subtly encourages users to add alt text, which should always be encouraged. I don’t know if the space is really all that beneficial to anyone, but I can potentially see users arguing that it is useful. All that to say that I think the current behaviour should remain the default, I just want an option in the settings that enables the changes that I am suggesting. Call it “Advanced Markdown URL/Image buttons” or something.

A compromise that I could imagine would be to automatically select the https:// (if that is possible). Instead of automatically placing the cursor between the square brackets, if the https:// is automatically selected, that would mean that I would be able to just paste and overwrite it. Very simple. The only downside to this is that it is no longer subtly encouraging alt text.

This is all not necessarily a big deal. Feel free to ignore this request.

  • 𝙈𝙞𝙖@quokk.auM
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    1 month ago

    That’s a great idea, and on reflection it’s certainly something that has bothered me - especially with hyperlinks and having to remove the https.

    I’ll work on it today :3

    Edit: All done and added to next release. Also removed the ‘quick link’ and email options from the url button so pressing it instantly inserts the link.

    • SatyrSack@quokk.auOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      Also removed the ‘quick link’ and email options from the url button

      Makes sense to me. What even is the purpose of those options? I don’t recognize that syntax.