Skip to content

Commit

Permalink
Update demo of table caption.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbarnas committed Apr 26, 2021
1 parent 9387759 commit 522c293
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
import TableProperties from '@ckeditor/ckeditor5-table/src/tableproperties';
import TableCellProperties from '@ckeditor/ckeditor5-table/src/tablecellproperties';
import TableCaption from '@ckeditor/ckeditor5-table/src/tablecaption';
import Superscript from '@ckeditor/ckeditor5-basic-styles/src/superscript';

import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud-services-config';

Expand Down Expand Up @@ -47,5 +48,6 @@ window.ClassicEditor = ClassicEditor;
window.CKEditorPlugins = {
TableProperties,
TableCellProperties,
TableCaption
TableCaption,
Superscript
};
55 changes: 36 additions & 19 deletions packages/ckeditor5-table/docs/_snippets/features/table-caption.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,85 +3,102 @@
<table>
<thead>
<tr>
<th colspan="2">&nbsp;</th>
<th>Name</th>
<th>Mass (1024kg)</th>
<th>Mass (10<sup>24</sup>kg)</th>
<th>Diameter (km)</th>
<th>Density (kg/m3)</th>
<th>Gravity (m/s2)</th>
<th>Gravity (m/s<sup>2</sup>)</th>
<th>Length of day (hours)</th>
<th>Distance from Sun (10<sup>6</sup>km)</th>
<th>Mean temperature (°C)</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2" rowspan="4">Terrestrial planets</th>
<th>Mercury</th>
<td>0.330</td>
<td>4,879</td>
<td>5427</td>
<td>3.7</td>
<td>4222.6</td>
<td>57.9</td>
<td>167</td>
</tr>
<tr>
<th>Venus</th>
<td>4.87</td>
<td>12,104</td>
<td>5243</td>
<td>8.9</td>
<td>2802.0</td>
<td>108.2</td>
<td>464</td>
</tr>
<tr>
<th>Earth</th>
<td>5.97</td>
<td>12,756</td>
<td>5514</td>
<td>9.8</td>
<td>24.0</td>
<td>149.6</td>
<td>15</td>
</tr>
<tr>
<th>Mars</th>
<td>0.642</td>
<td>6,792</td>
<td>3933</td>
<td>3.7</td>
<td>24.7</td>
<td>227.9</td>
<td>-65</td>
</tr>
<tr>
<th rowspan="4">Jovian planets</th>
<th rowspan="2">Gas giants</th>
<th>Jupiter</th>
<td>1898</td>
<td>142,984</td>
<td>1326</td>
<td>23.1</td>
<td>9.9</td>
<td>778.6</td>
<td>-110</td>
</tr>
<tr>
<th>Saturn</th>
<td>568</td>
<td>120,536</td>
<td>687</td>
<td>9.0</td>
<td>10.7</td>
<td>1433.5</td>
<td>-140</td>
</tr>
<tr>
<th rowspan="2">Ice giants</th>
<th>Uranus</th>
<td>86.8</td>
<td>51,118</td>
<td>1271</td>
<td>8.7</td>
<td>17.2</td>
<td>2872.5</td>
<td>-195</td>
</tr>
<tr>
<th>Neptune</th>
<td>102</td>
<td>49,528</td>
<td>1638</td>
<td>11.0</td>
<td>16.1</td>
<td>4495.1</td>
<td>-200</td>
</tr>
<tr>
<th colspan="2">Dwarf planets</th>
<th>Pluto</th>
<td>0.0146</td>
<td>2,370</td>
<td>2095</td>
<td>0.7</td>
<td>153.3</td>
<td>5906.4</td>
<td>-225</td>
</tr>
</tbody>
</table>
<figcaption>The Solar System</figcaption>
<figcaption>
Data about the planets of our solar system (Planetary facts taken from
<a href="http://nssdc.gsfc.nasa.gov/planetary/factsheet/">Nasa's Planetary Fact Sheet - Metric</a>).
</figcaption>
</figure>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ClassicEditor
.create( document.querySelector( '#snippet-table-caption' ), {
extraPlugins: [
CKEditorPlugins.TableCaption
CKEditorPlugins.TableCaption, CKEditorPlugins.Superscript
],
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells', 'toggleTableCaption' ]
Expand Down

0 comments on commit 522c293

Please sign in to comment.