BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Auto-fill URL portion of links in the Markdown editor

Open kdkasad opened this issue 3 years ago • 0 comments

Describe the feature you'd like

When editing in the Markdown editor, it is possible to select some text and press Ctrl+K to turn that into a Markdown link. The feature I want to propose is automatically filling in the URL portion when the selected text was a URL or domain.

Example

The user types See google.com for details. They select google.com and press Ctrl+K.

Current behavior

The text is converted to See [google.com]() for details with the cursor placed inside the new parentheses.

Proposed behavior

The text would be converted to See [google.com](google.com) for details. The entire text inside the parentheses would be selected. This way, if they do not want the pre-filled URL, they can type as they normally would and it would not change the resulting behavior.

Exact implementation may vary. It may be decided that this behavior only occurs when a scheme is added (e.g. https://), because it's easier to detect.

Describe the benefits this would bring to existing BookStack users

It would bring a very small QoL improvement when writing pages using the Markdown editor.

Can the goal of this request already be achieved via other means?

No. It would require adding functionality to the Markdown editor.

Have you searched for an existing open/closed issue?

  • [X] I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?

0 to 6 months

Additional context

No response

kdkasad avatar Aug 20 '22 21:08 kdkasad