WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.39k stars 4.15k forks source link

Rich text blocks should include a Clear Formatting option #8869

Open Clorith opened 6 years ago

Clorith commented 6 years ago

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 commented 6 years ago

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 (https://github.com/WordPress/gutenberg/issues/6132#issuecomment-380767105).

travelmassive commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

ellatrix commented 3 years ago

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 commented 2 years ago

Any Update on this?

Clorith commented 2 years ago

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 (https://github.com/WordPress/gutenberg/issues/6132#issuecomment-380767105).

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 commented 2 years ago

how is this still not resolved