community-plugins: πŸ› Announcements: Markdown not rendering properly

Workspace

announcements

πŸ“œ Description

When creating an announcement, the interface displays a WYSIWYG interface for crafting the announcement. I like the interface and the active preview. However, when clicking on the published announcement, the markdown formatting is not accurately rendering.

πŸ‘ Expected behavior

It should render the announcement formatting as displayed in the WYSIWYG editor.

πŸ‘Ž Actual Behavior with Screenshots

Here are screenshots that display what it looks like it in the editor versus what it looks like rendered.

Image Image

πŸ‘Ÿ Reproduction steps

  • With the plugin installed, place the following code in the announcement submission (remove the escape ticks for the code block example)
**Bold**
*Italics*
~~Strikethrough~~

---

# Title1
## Title2
### Title3
#### Title4
##### Title5
###### Title6

[Link](https://www.example.com)

> Quote

`This is code`

/`/`/`
import { someFunction } from @some/thing;

const someFunction();
/`/`/`

- List 1
- List 2
- List 3

1. Numbered List 1
2. Numbered List 2
3. Numbered List 3
  • Validate the formatting in the WYSIWYG preview side
  • Submit the announcement
  • View the announcement

πŸ“ƒ Provide the context for the Bug.

No response

πŸ‘€ Have you spent some time to check if this bug has been raised before?

  • I checked and didn’t find similar issue

🏒 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I’m happy to collaborate on a PR with someone else

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Here is my takeaway:

To truely make it WYSIWYG, we should replace <MarkdownContent> by <MDEditor.Markdown> (which is the one used for editing the announcements).

I did a quick and dirty test, and it works. But I think it could have a major impact, so I’d prefer to have @kurtaking involved:

Willing to take a few votes here on if this provides a better experience. I will check out how it looks for myself over the weekend.

For those interested, in the latest version, you can now set md-editor to get the same Markdown rendering as the editor. More details can be found in the documentation

Latest release will include the fix for this.

Hey @awanlin,

I created a PR that allows setting either the MDEditor or the Backstage one for markdown rendering: https://github.com/backstage/community-plugins/issues/3187

@kurtaking @gaelgoth any updates or news on this?

@04kash is currently building the frontend of a new plugin, β€œmorgue”, using mdEditor: https://github.com/backstage/community-plugins/issues/2577#issuecomment-2840733548

I think that it would be great to have a bit of consistency between this work-in-progress plugin and Announcements plugin

We have upgraded to the newest versions of this lib and are experiencing this to be partially working. Many of the GitHub style syntax keywords work as expected but these in particular do not:

https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/

What is interesting is that the above keywords work in the WYSIWIG edtior, but not in the announcements themselves.

Image

but not in the announcement itself

Image