Ninja Academy Posted October 23, 2017 Posted October 23, 2017 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. 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!
Joel R Posted October 23, 2017 Posted October 23, 2017 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.
Ninja Academy Posted October 23, 2017 Author Posted October 23, 2017 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!
Numbered Posted December 5, 2017 Posted December 5, 2017 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?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.