We are facing problem, when copy/pasting a table from MS Word into CK Editor. We are using CKEditor 3.6.2. We are using the "Paste from Word" button on the editor, to copy the table along with the associated formatting. The problem appears to be with formatting, if a column is formatted with for example to have a margin of 1 pt, and if there are 1000 rows, then each of the 1000 cells in that column's style will have this as part of their style information. If there are 5 or 6 columns with 5 or 6 different formatting information like this and even if there are 100 lines in the copy/pasting from Word, then this results into a bloated piece of text to store and transfer between browser and the app. In other words even if the actual text is 1k, it will result into tens of kb of text. See the following piece of text
<tr style="height: 20px"> <td nowrap="nowrap" style="border-bottom: black 1pt solid; border-left: black 1pt solid; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; height: 20px; border-top: #000000; border-right: black 1pt solid; padding-top: 0in"> <p align="center" style="text-align: center"> <span style="font-size: 8pt"><span style="font-family: calibri, sans-serif">1343</span></span></p> </td> <td nowrap="nowrap" style="border-bottom: black 1pt solid; border-left: #000000; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; height: 20px; border-top: #000000; border-right: black 1pt solid; padding-top: 0in"> <p align="center" style="text-align: center"> <span style="font-size: 8pt"><span style="font-family: calibri, sans-serif">11437153</span></span></p> </td> <td nowrap="nowrap" style="border-bottom: black 1pt solid; border-left: #000000; padding-bottom: 0in; padding-left: 5.4pt; padding-right: 5.4pt; height: 20px; border-top: #000000; border-right: black 1pt solid; padding-top: 0in"> <p align="center" style="text-align: center"> <span style="font-size: 8pt"><span style="font-family: calibri, sans-serif">1</span></span></p> </td>
Because of all the duplication of the formatting information on each cell, 12 rows of the table with 12 columns took about 56K of space.
Is there a way to define styles and use them instead of repeating the formatting information over and over when copy/pasting tables from MS Word to save some space ?