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 blocks should include a Clear Formatting option #8869

Open
Clorith opened this issue Aug 11, 2018 · 10 comments
Open

Rich text blocks should include a Clear Formatting option #8869

Clorith opened this issue Aug 11, 2018 · 10 comments
Assignees
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement.

Comments

@Clorith
Copy link
Member

Clorith commented Aug 11, 2018

With rich text blocks, such as paragraphs, quotes etc. You may also get unexpected formatting when pasting resources from other locations.

We do not offer a way to clear this formatting though, we should definitely include the clear formatting option in any rich text block, as this is likely to pop up in any of them.

For reference, the classic block does have the clear formatting option, although hidden in the extended kitchen sink, but we obviously want to promote the use of the new streamlined blocks.

@designsimply designsimply added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system labels Aug 13, 2018
@designsimply
Copy link
Member

Noting for reference that Command+Shift+V has been suggested as a way to paste content without formatting in past discussions and that ideas were also explored around offering a contextual choice for how to handle content at the time it is pasted (#6132 (comment)).

@ellatrix ellatrix added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Feb 8, 2019
@ellatrix ellatrix self-assigned this Nov 15, 2019
@travelmassive
Copy link

This is crazy. Most editors (who are non-technical) have no idea that copy/pasting from sources such as Google docs, etc will cause the text to be wrapped up in divs/spans that then go on to destroy formatting in the posts.

Asking people to Command+Shift+V is a flawed workaround.

@rwkyyy
Copy link

rwkyyy commented Mar 2, 2021

I've recently bumped into this issue with a client of mine, I had to enable classic editor for them so they can use this function, they use a lot of word documents as sources for the content on their website; ti'll now did not believe this was an issue; I use as a default the cmd/ctrl+shift+v but this is hard for non-technical users.

@ellatrix
Copy link
Member

ellatrix commented Mar 8, 2021

With rich text blocks, such as paragraphs, quotes etc. You may also get unexpected formatting when pasting resources from other locations.

From where does this unexpected formatting come? We already clear formatting on paste from external sources. The only source of unexpected formatting would come from either converted legacy content or self inserted HTML.

With that in mind, what formatting should be cleared with this button? Should we clear semantic formatting? What about links and images?

@ryanleichty
Copy link

ryanleichty commented Mar 11, 2021

I would agree, a clear formatting button would be beneficial. I have a page that someone imported from a word document that included underlined text. I've removed the underline button from the block editor as I want a singular approach to adding emphasis to the text on our site (similar to this editor's interface), but now I can't un-underline the text. I have to copy/paste it back in without formatting and do some other gymnastics along the way.

@mtias
Copy link
Member

mtias commented Jul 13, 2021

@ryanleichty @ellatrix it seems for that last use case, if a formatting is disabled we should discard it on paste instead.

@ellatrix
Copy link
Member

Yes, we could.
Additionally we could add a clear formatting button to the rich text dropdown to clear any formatting that is not recognised by any format.

@fahimanwer
Copy link

Any Update on this?

@Clorith
Copy link
Member Author

Clorith commented Jul 5, 2022

Noting for reference that Command+Shift+V has been suggested as a way to paste content without formatting in past discussions and that ideas were also explored around offering a contextual choice for how to handle content at the time it is pasted (#6132 (comment)).

Just a quick comment that Ctrl+Shift+V is what Windows uses for its built in paste-without-formatting functionality, so we want to make sure we do not conflict with it, and if we do override how Windows treats this shortcut, we need to make sure we do as good of, if not better, a job of stripping things.

And obviously a shortcut should ideally only be complimentary to the actual feature :)

@mp205
Copy link

mp205 commented Sep 6, 2022

how is this still not resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

9 participants