Ticket #6951 (pending New Feature)
Floating div element
| Reported by: | mstohr | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | UI : Dialogs | Version: | 3.5 |
| Keywords: | Cc: |
Description
In some cases we define a table with multiple rows, but we want to float the rows into columns, e.g. we have a label printing challenge. The user defines one or many labels in a row, an we want to print them in a 2-column page.
In HTML we would have the user to create a table with one column, many rows. And then put a <div style="width:50%;float: left"></div> around the table.
Of course, the user may already align all rows in 2 columns, but in our scenario the user effectively creates only one cell. And using a mail merge functionality, the rows are generated.
Change History
comment:2 Changed 2 years ago by mstohr
Let's say we have added the following table with CKEditor:
<table>
<tr>
<td>Column 1</td>
</tr>
</table>
We use this input from the user and multiply each row using an input data set (in a kind of mass mail merge). As a result, we'll have the following table in HTML:
<table>
<tr>
<td>Row 1 Column 1</td>
</tr> <tr>
<td>Row 1 Column 2</td>
</tr> <tr>
<td>Row 2 Column 1</td>
</tr> <tr>
<td>Row 2 Column 2</td>
</tr>
</table>
Now, an user in fact wants to print labels on a 2-column paper like the following table:
<table>
<tr>
<td>Row 1 Column 1</td> <td>Row 1 Column 2</td>
</tr> <tr>
<td>Row 2 Column 1</td> <td>Row 2 Column 2</td>
</tr>
</table>
All we need is to define in a field in the table dialog which defines how many rows should be transposed into columns. To achieve we would use the initial table and just add a div element: <div style="width: 50%; float: left;"> <table>
<tr>
<td>Row 1 Column 1</td>
</tr> <tr>
<td>Row 1 Column 2</td>
</tr> <tr>
<td>Row 2 Column 1</td>
</tr> <tr>
<td>Row 2 Column 2</td>
</tr>
</table> </div>
So, we would need to add the number of columns like 1, 2, 3, 4 which will set width 100%, 50%, 33%, 25%...
I know this is a special case...we could extend the CKEditor code...I am happy to provide this, but I'd prefer if this would be included in the Editor...

Please make your feature request with more clear structural description.