decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

Switching From Rich Text to Markdown Displaces Attribute List Definitions

Open jonsgreen opened this issue 1 year ago • 0 comments

Describe the bug Switching from the Rich Text editor to Markdown will displace Attribute List Definitions.

For example:

## The Solution
{:.bg-yellow.leading-3.inline-block.mb-4.font-extrabold}

becomes:

## The Solution

{:.bg-yellow.leading-3.inline-block.mb-4.font-extrabold}

To Reproduce

One can use the above example. You might need to change something in the rich text editor to observe the effect.

Expected behavior

Ideally the rich text editor would ignore the attribute list when formatting the markdown.

Applicable Versions:

  • Netlify CMS version: 2.15.69
  • Git provider: GitHub
  • Browser version Chrome 103.0.5060.134
  • Node.JS version: 16.13.1

CMS configuration

Not relevant

Additional context I am guessing that you currently don't support this Markdown extension. I know that generally it is incorrect syntax to have lines before or after a heading tag in Markdown though these attribute lists break that convention. Kramdown, which is the parser used by Bridgetown, supports this extension and is quite useful so I am curious if it would not be too difficult to support whether this is something that could be fixed? I know that there are similar issues that have been reported and some have been resolved.

jonsgreen avatar Aug 01 '22 23:08 jonsgreen