cds-snc / cds-snc/platform-forms-client

Pasting content shouldn't allow h1 tag for Rich Text editor

Open
#7,870 1 comment 0 reactions 0 assignees View on GitHub
a11y bug
Dominant language
TypeScript
Stars
46
Forks
16
Avg merge
1d 8h
Merged PRs (30d)
85

Description

## Description

When pasting content from a document i.e. https://docs.google.com/document/d/1_J-Vb45O4WBAoK7H9uBMBUvQJ0SvJ8HAeLCEojJxql0/edit?tab=t.0

H1's get created this shouldn't be allowed as it's not an option in the editor itself

Image

Contributor guide

Open the contributing guide

Research direction

Start by locating the Rich Text editor and reproducing the issue by pasting content from a document such as the linked Google Doc. Trace the paste handling to see where an h1 is accepted, then verify that pasted content no longer creates h1 elements while the editor's available options remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.