apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
MIT License
4.36k stars 590 forks source link

Rich-text removing span tags configured with the configured class attribute(s) #4347

Closed Darren-Caboz closed 5 months ago

Darren-Caboz commented 11 months ago

To Reproduce

Step by step instructions to reproduce the behavior:

  1. Setting the style option in rich-text: { tag: 'span', label: 'Highlight: Red', class: 'highlight-red' }

  2. In rich-text editor, set the selected option on the text.

    image
  3. Switch from edit mode to preview mode and back. Style option is no longer set in edit mode.

    image
  4. You can save this style option state, however if you make an update in the rich-text editor afterwards the set style option will then be removed as being set.

Expected behavior

To keep the set style option in preview mode after being set as well as when any edits are made to the rich-text afterwards

Describe the bug

The rich-text style option is not setting in preview mode after initial setting in preview mode, as well as being removed after edits are made in the rich-text

Details

Version of System: Node.js v18.18.0, Mac OS, Apostrophe v3.59.1

BoDonkey commented 11 months ago

I can confirm this is occuring and has been for awhile. I'll open a ticket. Thanks for bringing it to our attention!

boutell commented 11 months ago

I don't completely understand the ticket.

Is the span getting stripped out on save, or is it something more nuanced than that? Exactly what happens?

Thanks!

BoDonkey commented 11 months ago

I'll update the ticket.

unknownBalak commented 10 months ago

Hi anyone is working on this issue?

BoDonkey commented 10 months ago

There is an open ticket, but I don't think it is in the current cycle. Have you worked with Tiptap before?

unknownBalak commented 10 months ago

Hello, @BoDonkey! I'm new to contributing to open source, and I haven't had any experience with Tiptap before. Is Tiptap somehow related to this particular issue?

BoDonkey commented 10 months ago

Yeah - This bug is in the rich text editor widget of the ApostropheCMS framework. That RTW is powered by Tiptap. This isn't really an easy ticket unless you know both Tiptap and Apostrophe. I need to find some other issues that are good first time issues. You can come to our Discord channel to discuss open-source contribution if you would like. https://discord.com/invite/HwntQpADJr It is a bit quiet at the moment, but we are trying to build it up. You can AMA, not just about Apostrophe.

stuartromanek commented 5 months ago

This was fixed as of the 3.62.2 release @unknownBalak