Jump to content

Add third paste option: remove formatting but allow restore


Colonel_mortis

Recommended Posts

It would be really useful if, in addition to the current paste options of "Keep formatting, but allow user to remove formatting" and "Remove formatting and do not allow user to restore", you added a third option: "Remove formatting, but allow user to restore". By default, their content would paste as plain text, but they would get the banner allowing them to add the formatting back if they want.

Too many users ignore or don't notice the formatting banner, and that causes loads of issues with the night theme, where black text is unreadable.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 1 month later...
  • 2 weeks later...

@Lindy was this marked as not planned for technical reasons, or because you don't like the idea? Because this topic appears to have been received quite well, and I can think of a fairly straight forward method to implement what I suggested (just use your current code, but remember the HTML version and strip the tags and insert the plain text version), as well as an incredibly easy method to get a similar effect (use CKEditor's built in semantic markup only paste mode, which is the best of both words - it keeps the relevant formatting, while removing the styles that are almost always undesirable, such as the foreground and background colours added by Chrome.

Link to comment
Share on other sites

2 hours ago, Colonel_mortis said:

@Lindy was this marked as not planned for technical reasons, or because you don't like the idea? Because this topic appears to have been received quite well, and I can think of a fairly straight forward method to implement what I suggested (just use your current code, but remember the HTML version and strip the tags and insert the plain text version), as well as an incredibly easy method to get a similar effect (use CKEditor's built in semantic markup only paste mode, which is the best of both words - it keeps the relevant formatting, while removing the styles that are almost always undesirable, such as the foreground and background colours added by Chrome.

I don't get how you could undo deletion of the formatting after you've already tossed it. 

Link to comment
Share on other sites

17 hours ago, CheersnGears said:

I don't get how you could undo deletion of the formatting after you've already tossed it. 

The same way it removes formatting when you click the button at the moment - store the rich version in a JS variable, and insert the plain or semantic version into the page, then if they click the button you just revert the editor to how it was before the paste, and insert the rich version, rather than the plain version as it does now.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...