basecamp / trix

A rich text editor for everyday writing
https://trix-editor.org/
MIT License
19.01k stars 1.11k forks source link

Hyperlink inline images #940

Open leejarvis opened 2 years ago

leejarvis commented 2 years ago

I'd like to add support for hyperlinking inline images. It appears this isn't supported out of the box, and when I try to create some custom code that wraps the <img> tag in an anchor tag, Trix will strip it out.

Strangely, when attempting to link an image on https://trix-editor.org/ via a keyboard shortcut, the box just shows false no matter what. This seems like a bug to me.

Additionally, if you open the hyperlink input and immediately click "Unlink", the hyperlink button in the toolbar will become active.

Steps to Reproduce
  1. Add an inline image
  2. Hit ctrl/cmd K to add a hyperlink
  3. Observe that "false" is shown in the text field and no link can be saved
Details
silva96 commented 2 years ago

Interested on this aswell

maxvlc commented 1 year ago

Any progress on that??