Hi,

I am really stuck on using tables within wysiwyg whenever I add a table it looks fine even in preview mode. As soon as I press save it disappears and I am just left with the content within the table. I have tried different border sizes but still the same result. I have tried it on all browsers and none show the table. I feel like Drupal may be overriding it somewhere but have no idea where to start looking. There are many similar posts but still nobody has a solution.

please help.

Comments

WorldFallz’s picture

Make sure the input format you're using, if not 'full html', allows the html elements necessary for tables (ie table, thead, tbody, tr, td, etc.).

Sarah_London’s picture

Hi,

Thank you for you reply. I am using Full HTML and the tables are 100% included in the allowed HTML tags so no luck with that one. Any other ideas?

The same is happening if I try to create a straight forward table with the code below.

Month Savings
January $100

My site just shows
___________________
Month Savings
___________________
January $100

Regardless of what I write in HTML

WorldFallz’s picture

hmm... what are any css styles that are applied to table type selectors?

sharp3d’s picture

The defaults.css has a table border-colapse
I'm not sure what the solution should be... so I am personally trying an override this in the theme layout.css on tables within with the content "div.content table"

Anybody else trying something in the theme to solve this?

JR_Logan’s picture

I was having a similar problem with the tables disappearing, but in Drupal 7. Normally I would think that input format would be the issue but it was actually changing the content. What worked for me was disabling the "Cleanup and Output: options in the WSIWYG editor profile for "Full HTML". ( admin/config/content/wysiwyg/profile/full_html/edit).

Anthony Pero’s picture

CKEditor tries to add table styles inline using the style property. Full HTML allows the table tag but not the style property. In otherwords, <table style="border-width:1px;"> gets stripped and printed as <table>. The style property gets stripped out. In order to get around this, you either need to add css code to your stylesheet to deal with tables en masse, or you need to use an input filter module such as WYSIWYG Filter module.

Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/

Anthony Pero’s picture

Correction on my post. Full HTML allows inline styles. It's the HTML Filter itself that doesn't. So, if you create a new input format and add <table> <tr> <td> <th> etc to your input filter, the format will still strip out the style property, even though you added the proper html tags to the Format. This is also how WYSIWYG CKEditor adds color to things as well. So, it will get stripped out unless you use Full HTML or WYSIWYG Filter module.

Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/

pgmckillop’s picture

That cleared up a huge frustration for me too.

manu.ieee’s picture

Thanks, It also worked for me :)

bardill’s picture

I have the same problem using WYSIWYG Filter module
See here: http://drupal.org/node/1218218

b