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

Use proper semantic HTML for inline text formatting #1610

Closed
barklund opened this issue May 6, 2020 · 3 comments
Closed

Use proper semantic HTML for inline text formatting #1610

barklund opened this issue May 6, 2020 · 3 comments
Labels
Elements: Text P3 Nice to have Package: Rich Text /packages/rich-text Type: Enhancement New feature or improvement of an existing feature

Comments

@barklund
Copy link
Contributor

barklund commented May 6, 2020

Feature Description

Since #1323 all inline text formatting in a text field is done using <span> and inline style properties.

This should be changed to proper semantic HMTL elements where applicable - e.g. going from the current:

<span style="font-weight: 800">Hello</span>
<span style="text-decoration: underline">world!</span>

To:

<strong style="font-weight: 800">Hello</strong>
<em>world!</em>

Thus using semantic elements where possible (for bold font-weights, italic and underline) and keep spans where not (for non-bold font weights, text color and letter spacing).

This however requires moving away from the current draft-js-export-html dependency to a custom DraftJS-to-HTML converter (and of course vice-versa).


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

QA Instructions

@barklund barklund added Elements: Text Type: Enhancement New feature or improvement of an existing feature labels May 6, 2020
@o-fernandez
Copy link
Contributor

@barklund do you think this is important for Beta? Stable?

@swissspidy
Copy link
Collaborator

Related: #5326

@BrittanyIRL
Copy link
Contributor

@miina this feels like a prometheus thing? Not really sure why it got relabeled pea pod (but that was like 14 months ago so....)

@swissspidy swissspidy added the Package: Rich Text /packages/rich-text label Jan 27, 2022
@swissspidy swissspidy closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Elements: Text P3 Nice to have Package: Rich Text /packages/rich-text Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

7 participants