I am using ckeditor for drupal (ver. 3.6.3), along with our own sub-theme of the Marinelli theme on Drupal 7. We are switching from D6, and I have noticed that in both D6 and D7, the ability to insert a table and be able to modify the table border using a wysiwyg editor seems impossible.
I have spent several days searching, and have tried combining ckeditor with wysiwyg module/api. In addition, I have tried installing the CCK table field module, and finally tried switching themes (the only one that seems to work is stark 7.17, and even that one does not allow for inner borders to be set). I know I can modify the css via the suggestion at http://drupal.org/node/1212204, but this is a static setup. If the end user wants to switch to no border, or change the border width, it is impossible via the wysiwyg editor.
I feel I must be missing something - is it truly this difficult to allow a user to insert and format a table via any of the wysiwyg edtors in drupal? Any help would be appreciated.
Thanks,
Bill
Comments
I use the CKeditor module
I use the CKeditor module rather than the wysiwyg bridge, but I presume the setup is similar. Have you enabled the Insert Table button in the wysiwyg editor configuration and does the text format you use (defined in admin/config/content/formats) limit HTML tags such as 'table'? In the CKeditor module, I can adjust the border thickness and, under the advanced tab, I can set a CSS style to change color, etc.
I have enabled the insert table button
I have enabled the insert table button, and the text format does not limit the use of table tags. I am using HTML purifier advanced in the text format, but I have added table tags (similar to those posted at http://drupal.org/node/1543100) to the allowed HTML, and still nothing. Firebug tells me that the tags are still there, just not being rendered. I disabled HTML purifier just to see what would happen, and the issue remained.
For now, I am just going to use the suggestion to have the tables rendered with a static 1px width, but I appreciate the input!
- Bill
I've just come across this
I've just come across this problem. The fix I used was:
Get a solid background around your tables:
1) Login to your site, go to 'Configuration', click 'Performance' and turn off 'compress cached pages', 'aggregate and compress css files' and 'aggregate javascript files', then click save
2) Now clear the cache
3) Go to the node/content page with your table and edit it
2) Right click anywhere in the table and select 'Table Properties'
3) Click 'advanced' tab
4) Where you see the 'Style' which will probably already contain 'width: 500px', make it read 'width: 500px; border-style: solid; border-width: 1px' and save it.
Now get lines around the individual cells:
5) FTP onto your site and go to '/sites/all/themes/marinelli/css' and edit 'typography.css'
6) Under the section 'Tables' you will see the line 'th,td,caption { padding: 4px 10px 4px 5px; }'
7) Change it to be 'th,td,caption { padding: 4px 10px 4px 5px; border-style: solid; border-width: 1px}' and the save
8) Now clear your cache
That should do it. Example at http://www.pagg.co.uk/buy-pagg-stack-supplements
9) Remember to now re-enable 'compress cached pages', 'aggregate and compress css files' and 'aggregate javascript files' in 'Configuration', 'Performance'. Save it and then clear your cache again just to be on the safe side.