Opened 10 years ago

Last modified 10 years ago

#12905 confirmed New Feature

Style removal context menu

Reported by: Chris Graham Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version:
Keywords: Cc:

Description

As you know, one of the worst (notorious) problems about WYSIWYG editors is the style mess made when pasting, or when styling using a pure visual approach. You make a number of efforts to mitigate this: the advanced content filter, paste from word, I think other internal filters, and sensible decisions regarding how to merge and remove HTML nodes. This is all good, but it does not solve the problem well enough in my opinion, especially for the case where users are pasting into an unfiltered editor (unfiltered due to necessary support for arbitrary markup).

I suggest you extend the "Remove Format" plugin to have a context menu. When you right-click at any point in the document it has an item on the context menu to remove any of the inline styles defined above that point.

For example, you paste something in and it has got a line-height there (because the browser extracted it from some CSS class when you did the original 'copy' op). The user can right click, see it there, and remove it. This stops them needing to remove it manually from the HTML view, which frankly is scary when a lot of inline styles are defined. It would be good also to be able to choose to remove a style globally (i.e. remove all line-height defined for any node).

Please consider this. I think it would be a really big improvement to CKEditor.

Change History (2)

comment:1 Changed 10 years ago by Chris Graham

Actually, a better approach would be an option to activate a dialog for the remove formatting button.

The dialog could show a checkbox for each inline style above the text selection, all checked for removal by default.

A further checkbox would indicate to remove the styles from the whole document (unchecked by default).

comment:2 Changed 10 years ago by Jakub Ś

Status: newconfirmed

Your request could make sense and it looks like a good candidate for a third party plugin. I don't see it as a near development from the core team but I'm confirming this ticket for future reference.

NOTE: We have removeFormat with two options ( ​http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-removeFormatTags, ​http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-removeFormatAttributes ) and with some awaiting change to extend it: http://dev.ckeditor.com/ticket/12304. Perhaps making custom plugin using that option would be enough. User could select whole or part of text, then select what he wants to remove, config option would be set on the fly and remove format executed.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy