Ability to wrap images with anchor in Rich Text Editor

180 views
Skip to first unread message

Darren N

unread,
May 12, 2015, 9:29:17 AM5/12/15
to wag...@googlegroups.com
Currently using Wagtail for a large client site, and have stumbled on a pretty basic issue: There is no apparent way to link an image in the Rich Text Editor. 

I cannot wrap an <img> with an <a>. Have been doing a fair amount of searching on this topic and am unable to find anything. Can someone point me in the right direction to hack in this fairly basic feature?

Thanks,

D

Joss Ingram

unread,
May 12, 2015, 10:53:31 AM5/12/15
to wag...@googlegroups.com
I can make an image a link,

Select the image by dragging the cursor over it, so it goes blue, then click the 'link' (chain icon) in the editor, select a page for it to link to, then save the page.

H.T.H

Joss

Darren N

unread,
May 12, 2015, 11:22:22 AM5/12/15
to wag...@googlegroups.com
Took a bit of wiggling about but got it. None of the end users were able to figure this out, nor the devs on our side.

Tom Dyson

unread,
May 12, 2015, 11:30:52 AM5/12/15
to wag...@googlegroups.com
Thanks for your advice on this, Joss.

Darren, sorry this wasn't more obvious. Can you suggest a better way
of doing this? Should links be attributes on images themselves? PRs
welcome :)

Tom

On 12 May 2015 at 16:22, Darren N <v25m...@gmail.com> wrote:
> Took a bit of wiggling about but got it. None of the end users were able to
> figure this out, nor the devs on our side.
>
> On Tuesday, May 12, 2015 at 10:53:31 AM UTC-4, Joss Ingram wrote:
>>
>> I can make an image a link,
>>
>> Select the image by dragging the cursor over it, so it goes blue, then
>> click the 'link' (chain icon) in the editor, select a page for it to link
>> to, then save the page.
>>
>> H.T.H

--
tom dyson
+44 (0)1608 811870
http://torchbox.com
http://wagtail.io

Darren N

unread,
May 12, 2015, 11:33:41 AM5/12/15
to wag...@googlegroups.com
Hi Tom - 

It would be great if there was link or URL field in the Image selector. It would be a lot easier for the end users, "discoverability" is important.

Would love to contribute back up, but as I mentioned, I have a real hard time finding where to even begin with adding these types of features. I don't have a Django background.

-- Darren

Matthew Westcott

unread,
May 12, 2015, 6:08:26 PM5/12/15
to wag...@googlegroups.com
I think my standard soapbox rant about rich text applies here :-)

https://torchbox.com/blog/rich-text-fields-and-faster-horses/

I'd argue that "image plus link" is really a structural element, and not something that naturally belongs in a rich text field. If this is indeed something that's intended to appear within the 'flow' of article text, then Wagtail 1.0's StreamField will handle this very neatly... if it's part of an altogether different type of content, such as an image gallery, then you'd be better off designing that into your page model.

Cheers,
- Matt
> --
> You received this message because you are subscribed to the Google Groups "Wagtail support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wagtail+u...@googlegroups.com.
> To post to this group, send email to wag...@googlegroups.com.
> Visit this group at http://groups.google.com/group/wagtail.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/wagtail/c725eecd-f8ef-49f1-8a5f-6cc032c2e027%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages