smart-media
smart-media copied to clipboard
Media files are not included when searching for a link or button URL
Steps to reproduce:
- Insert some text into a post
- Highlight some text
- Click the "Link" button in the block toolbar
- Search for a phrase that matches an attachment
- Observe that no matching attachments are found
This is the default behaviour of the link inserter in WordPress, but given the additional smart features of media in Smart Media it would be great if attachments were searched here.
One complication is that the desired link in this case is probably not the attachment permalink but instead is the source URL of the uploaded file.
AC based on a bug report from a client:
As an editor on a site When I upload a PDF file to the media library Then I expect to be able to find that file when adding a link to a button on a page And the link that's used points to the original PDF file
Found some Gutenberg issues:
- https://github.com/WordPress/gutenberg/issues/8322
- https://github.com/WordPress/gutenberg/issues/22005