apostrophecms / apostrophecms/apostrophe

Rich text editor style selection bug

Open
#3,622 8 comments 0 reactions 0 assignees View on GitHub
bug contributions welcome help wanted
Dominant language
JavaScript
Stars
4.6k
Forks
650
Avg merge
19h 21m
Merged PRs (30d)
23

Description

Basically if you have multiple style types on the same HTML tag, like

```
{
tag: 'p',
label: 'Paragraph (P)',
def: true,
},
{
tag: 'p',
label: 'Small (P)',
class: 'small',
},
```
When you select `Small (P)` in the style picker dropdown it'll change the style, but the picker will mark `Paragraph (P)` as selected, which means you can't undo it. You need to select a different tag entirely, like

```
{
tag: 'h2',
label: 'Heading 2 (H2)',
},
```
and THEN you can select the original `Paragraph (P)` to revert the style selection

**Posted this to the discord and Alex Bea requested a github issue

Contributor guide

Open the contributing guide

Research direction

Start in the rich text editor's style picker and reproduce the issue with two styles sharing the p tag, one using the small class. The picker should mark the class-specific style as selected after applying it and allow selecting the default Paragraph (P) style to revert without first choosing another tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.