getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 226 forks source link

Custom nextgen-editor field renders page image url incorrectly #2240

Open thekenshow opened 2 years ago

thekenshow commented 2 years ago

I have a custom blueprint with the default editor set to nextgen-editor, and a second custom nextgen-editor field, defined as additional. Both fields are working normally except that for the additional field a) there is no way to insert a page image, and b) if the page image is copied in from the default field, it renders incorrectly.

The resulting markdown is identical in both (![](thumbnail_mar17_poster.jpg)) but the rendered HTML for the additional field is incorrect.

Here's the page header and md content:

---
title: 'Climate Forum'
additional: "**UPCOMING CLIMATE FORUM**\n\nCooperative Climate Solutions | Thursday March 17th 2022 | [RSVP here](https://us02web.zoom.us/meeting/register/tZIvf-yorT4qHN3R2tGLXhMTDgLvlmvfsKoL)\n\n![](thumbnail_mar17_poster.jpg)\n\nThanks for choosing to act:\n\n**Leigh Grigg** - The Sustainability Project\n\n**Joachim Ostertag** - Climate Action Team Owen Sound\n\n**Jenny Carver** - Georgian Bluffs Climate Action Team\n"
media_order: 'website.png,thumbnail_mar17_poster.jpg'
---

The goal of Climate Forum talks are to learn together the opportunities, challenges and barriers to climate action in our region.

![](thumbnail_mar17_poster.jpg)

And here is the Twig, contained in a Gantry5 Custom HTML particle, that renders the additional field:

{% if grav.page.header.additional %}
  {{ grav.page.header.additional|markdown|raw }}
{% endif %}

Here are the rendered img outputs for the two fields:

Default field

<img alt="" src="/user/pages/05.projects/08.climate-forum/thumbnail_mar17_poster.jpg">

Custom field (additional)

<img src="/thumbnail_mar17_poster.jpg" alt="">
thekenshow commented 2 years ago

has there been any progress on this?