CKEditor: Ticket #8531: No &nbsp; hack needed on tableshttps://dev.ckeditor.com/ticket/8531
<p>
The &amp;nbsp; trick we use on empty tables to show them is not needed. It can be solved by adding the following CSS to the editing area:
</p>
<pre class="wiki">table { empty-cells: show; }
</pre><p>
Not tested though.
</p>
<p>
Source: <a class="ext-link" href="http://bricss.net/post/7608102324/show-empty-cells-in-data-tables-with-empty-cells-show"><span class="icon">​</span>Show empty cells in data tables with empty-cells: show</a>.
</p>
en-usCKEditor/chrome/site/logo-ckeditor-dev.pnghttps://dev.ckeditor.com/ticket/8531
Trac 1.0.6post2j.swiderskiFri, 25 Nov 2011 15:54:17 GMTstatus changedhttps://dev.ckeditor.com/ticket/8531#comment:1
https://dev.ckeditor.com/ticket/8531#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>confirmed</em>
</li>
</ul>
<p>
As discussed earlier with @fredck - this feature was supposed to be used for the WYSIWYG area.
</p>
<p>
I have tried to test the issue a little bit. Here are my findings:<br /><br />
</p>
<p>
I’m not sure what @fredck meant by &amp;nbsp; trick as the only code for filling table I have found was the one from <tt>_source\plugins\table\dialogs\table.js</tt>:
</p>
<pre class="wiki">if ( !CKEDITOR.env.ie )
cell.append( makeElement( 'br' ) );
</pre><p>
I haven't found any code that would fill the table with &amp;nbsp; (Well except when switching to source from wysiwyg - but it has nothing to do presentation of the table).<br />
</p>
<hr />
<p>
Style <tt> empty-cells: show;</tt>is used to render background and borders of empty table cells. According to the article it should work in older versions of IE but <strong>in my tests it didn’t work in IE6 and IE7</strong> (empty table cells were not visible). Furthermore if you apply style provided by @fredck and remove the ‘if’ mentioned above, cells in non-IE browsers will be collapsed. The border and background will be visible but there will be no height. Cells will get line-height if you put cursor in them (Firefox) or type something inside them (Chrome).
</p>
<hr />
<p>
As I was saying before I didn’t find the code for filling the table in IE so I have prepared a simple test-case file – empty table with only one &amp;nbsp; in first cell.
</p>
<p>
<strong>Results:</strong> Borders and background were shown but none of the browsers showed empty table cells with line heights. They were either collapsed (IE8, IE9) or invisible (IE6, IE7). Only the cells with &amp;nbsp; had expected looks (the same result can be achieved with &lt;br /&gt; put inside table cell).
</p>
<hr />
<p>
<strong>To summarize</strong>. This style does not work in IE6 and IE7. Furthermore empty cells are collapsed so it looks to me like the only way to handle this is to use &amp;nbsp; or &lt; br /&gt; like we do.
</p>
<p>
<strong>NOTE:</strong> You can always add height to cell but still its border will not be visible in IE6-7.
</p>
Ticketj.swiderskiMon, 14 May 2012 13:12:21 GMTattachment sethttps://dev.ckeditor.com/ticket/8531
https://dev.ckeditor.com/ticket/8531
<ul>
<li><strong>attachment</strong>
set to <em>test3.html</em>
</li>
</ul>
Ticketj.swiderskiMon, 14 May 2012 14:02:24 GMTstatus changed; resolution sethttps://dev.ckeditor.com/ticket/8531#comment:2
https://dev.ckeditor.com/ticket/8531#comment:2
<ul>
<li><strong>status</strong>
changed from <em>confirmed</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>wontfix</em>
</li>
</ul>
<p>
I'm closing this as won't fix please reopen if I have missed something and there is a way to use it in all browsers.
</p>
Ticket