neon-jungle / wagtail-birdsong

Create, send, preview, edit and test email campaigns from within Wagtail
BSD 3-Clause "New" or "Revised" License
105 stars 26 forks source link

Absolute urls in local editor links #11

Closed glanzel closed 10 months ago

glanzel commented 3 years ago

This commit solves the Issue https://github.com/neon-jungle/wagtail-birdsong/issues/8 It changes only the urls of links created in the birdsong editor all other Richt Text Field Links are left untouched.

I hope that could be a useful approach for the Issue.

seb-b commented 3 years ago

Sorry missed this when it was first opened.

This looks good, I hadn't seen register_temporarily before. Looks like it was introduced in wt 2.10 so we'll have to up the minimum version. I cloned this branch and gave it a go, but my link added was still relative, was this working for you? image

glanzel commented 3 years ago

Hi I just tested it again. Still works for me. I use it like that: `class ACampaign(Campaign): body = StreamField(DefaultBlocks())

panels = Campaign.panels + [
    StreamFieldPanel('body'),
]`

When i use PageLinks or DocumentsLinks in the DefaultBlocks Editor the Preview already shows an absolute path for me.