getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[nextgen-editor] Editor messes up valid Markdown (element within list) #308

Open yankl opened 1 year ago

yankl commented 1 year ago

In Markdown it's possible to add an element within a list, as described here.

The following code is taken directly from the above Markdown guide:

* This is the first list item.
* Here's the second list item.

    I need to add another paragraph below the second list item.

* And here's the third list item.

This Markdown is converted correctly in Grav to a list with one two-paragraph bullet point.

However, if I view a page with this code in NextGen, then save, the markdown is converted to the following:

This is the first list item.

Here's the second list item.

I need to add another paragraph below the second list item.

And here's the third list item.

Namely, the fact that there was once a list there is lost entirely. A similar thing happens if I try to add a different element, such as the blockquote example which comes next in the guide:

* This is the first list item.
* Here's the second list item.

    > A blockquote would look great below the second list item.

* And here's the third list item.

becomes:

This is the first list item.

Here's the second list item.

> A blockquote would look great below the second list item.

And here's the third list item.

Grav v1.7.35 - Admin v1.10.35 - NextGen v1.1.12

Mr1mpossible commented 1 year ago

Having a similar issue here. It is cutting white space & changing the format of line breaks for me.

How I want it:

[h6]Grav Links  [/h6]
[svg-icon="cloud-storm" class="h-4 text-red-600 align-top" /] [GRAV Admin](/admin)  
[svg-icon="brand-tabler" class="h-4 text-blue-600 align-top" /] [Tabler Icons](https://tabler-icons.io/)  

What it converts it to:

[h6]
Grav Links
[/h6]

[svg-icon="cloud-storm" class="h-4 text-red-600 align-top" /][GRAV Admin](/admin) [](/admin)  
[svg-icon="brand-tabler" class="h-4 text-blue-600 align-top" /][Tabler Icons](https://tabler-icons.io/)