apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

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

Open Darren-Caboz opened this issue 1 year ago • 7 comments

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
  1. Switch from edit mode to preview mode and back. Style option is no longer set in edit mode. image
  1. 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

Darren-Caboz avatar Nov 18 '23 06:11 Darren-Caboz

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

BoDonkey avatar Nov 18 '23 14:11 BoDonkey

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!

boutell avatar Nov 20 '23 13:11 boutell

I'll update the ticket.

BoDonkey avatar Nov 20 '23 13:11 BoDonkey

Hi anyone is working on this issue?

unknownBalak avatar Dec 16 '23 10:12 unknownBalak

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

BoDonkey avatar Dec 16 '23 11:12 BoDonkey

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?

unknownBalak avatar Dec 16 '23 11:12 unknownBalak

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.

BoDonkey avatar Dec 16 '23 11:12 BoDonkey

This was fixed as of the 3.62.2 release @unknownBalak

stuartromanek avatar May 22 '24 20:05 stuartromanek