I am using WYSIWYG with TinyMCE in my Drupal 7 website. I observed that the copied content looks similar in editor and even preview also looks nice. But all the formatting is lost after publishing the content.

To debug the issue, I checked the HTML and found that the actual style is present in the code. Please see the below screenshot-Content after publishing

I noticed that after disabling the color property of background for td element, the original color appears. Please see the below screenshot- enter image description here

Please suggest any way to solve this issue.

1 Answer 1


Is it possible your input format is a "filtered HTML"? If I'm not in wrong it removes a lot of attributes: try to change it to "Full HTML" and verify the behaviour...

  • I am using "Full HTML". I can see the formatting in "Preview" but after saving, the formatting is lost. Am I missing something? or is it not configured properly?
    – ravi
    Commented May 3, 2016 at 13:44
  • Check what "Full HTML" text format is configured to do. If it is configured similar to the default "Filtered HTML" text format, then that is the cause. Alternatively you can also install an input filter module called WYSIWYG FIlter (the name is deceptive) which is a more robust input filter for properties and attributes allowing to whitelist those that are necessary.
    – mradcliffe
    Commented May 3, 2016 at 17:29
  • @mradcliffe: I am using the default configuration of "Full HTML". Please see the screenshot here
    – ravi
    Commented May 4, 2016 at 4:49
  • @RaviJoshi if you edit the content (after saving) that attribute is still present in the source? Commented May 4, 2016 at 12:37
  • @PierpaoloCira: Yes. I just tired editing it. The page opened in "Full HTML" editor view. I clicked on "Show HTML" and found the original HTML attributes in it. After saving it, the formatting is lost again. Somehow the global css is overwriting it.
    – ravi
    Commented May 4, 2016 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.