I am using CKEditor 4.1 and I'm trying to get the background color of yellow to show up on the pasted content. The table is from word (so this means it's in RTF). Everything seems to paste except for the background color. What is strange is that it's pasting the exact look I'm going for in the "Paste from word" box, but if you look in the content box, it does not show the background color.
The screenshot below shows the Paste From Word dialog box and how I want the content to look. The Editor behind the dialog shows how the content ends up getting pasted. I have tried everything including disabling the ACF (Advanced Content Filter).
Here are my current settings for the Allowed Content Config. Again, I have disabled this, and it doesn't work either.
When I inspect the "Paste from word" dialog box code, the background seems to be being set within the td styles background. for example: td styles='background-color: yellow'
config.allowedContent = {
'p h1 h2 h3 a strong em': {
styles: ['color']
},
'table tbody thead tfoot tr th td': true,
'table': {
attributes: ['width', 'border', 'cellpadding', 'cellspacing'],
styles: '*'
},
"tr td": {
attributes: ['background-color', 'background', 'rowspan', 'colspan'],
styles: '*'
},
"iframe": {
attributes: '*',
styles: '*'
}
};
config.pasteFromWordRemoveFontStyles
configuration value tofalse
? – Anna Tomanek