Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Darren-Caboz opened this issue Nov 18, 2023 · 7 comments
Labels

Comments

@Darren-Caboz
Copy link

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

@BoDonkey
Copy link
Contributor

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

@boutell
Copy link
Member

boutell commented Nov 20, 2023

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
Copy link
Contributor

I'll update the ticket.

@unknownBalak
Copy link

Hi anyone is working on this issue?

@BoDonkey
Copy link
Contributor

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

@unknownBalak
Copy link

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants