Jump to content

Remove Background Color


Ninja Academy

Recommended Posts

Posted

Hello everyone,

I've been looking around and I'm wondering if there is a solution for removing the background color of posts, specifically on content that is copy and pasted? My community does a lot of copy and pasting for formatting reasons, but this often causes problems as it brings with it background colors (we have light and dark themed skins). It is very easy for me to fix as the administrator, simple going into the source HTML and doing a find/replace on "background-color:#ffffff;", etc. The obvious downside to this solution is that normal members cannot get access to HTML for security reasons. My ideal solution would be a custom text editor option that removes any background color from selected text, basically does the html delete of any "background-color" fields.

Before it is suggested, highlighting and selecting "automatic" on the Background Color text box does not solve the problem. Here is an example of the issue. The forum skin is the black behind it and the white is background information from the copy/paste.

image.png.e61648329808dfeda4b00965ccedbdc5.png

Does something to fix this exist? Or could someone help point me towards the right resources to begin making the plugin myself?

Thank you in advance!

Posted

Usually when you paste, you will see an option in the bottom of the Editor to remove formatting. 

You can also add a button to the editor to remove formatting.  It looks like Tx.

Posted

I have that button already, but I am not looking to remove all formatting, only background-color. The reason my members use copy and paste is to preserve formatting styles. Thanks for the reply!

  • 1 month later...
Posted

up that topic. same request/question.

I tried to set

a.disallowedContent = '*{background*}';

inside /applications/core/interface/ckeditor/ckeditor/config.js, but this didn't work (any settings here didn't affect any changes..).

Can anybody helps? May be @Matt?

Archived

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

  • Recently Browsing   0 members

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