WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 4 months ago

#44477 new enhancement

Add Media on selected text should use the text as the link anchor.

Reported by: dotancohen Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:
PR Number:

Description

The the site admin or editor selects text in the WYSIWYG control and presses the "Add Media" button, the link has the media filename or title as the anchor text.

Instead, the anchor text should be the highlighted text.

Change History (1)

#1 @azaozz
4 months ago

  • Component changed from TinyMCE to Editor
  • Type changed from defect (bug) to enhancement
  • Version 4.9.6 deleted

If I understand right, the idea is to turn the selected text into a link when selecting a file from the media library that will produce a link (i.e. not image, video or audio). Perhaps we can do that, would be an "extension" of turning the selected text into a link when pasting an URL.

Moving to the "Editor" component for consideration for the block editor.

Note: See TracTickets for help on using tickets.