Textile: line breaks in table cells

Pickels picture Pickels · Jun 11, 2011 · Viewed 7k times · Source

How can I get the following with Texttile:

<table>
  <tr>
    <td>
       Model:
    </td>
    <td>
       Ford<br/>
       BMW<br/>
       VM
    </td>
 </tr>
</table>

So where one cell has multiple lines.

Answer

daroczig picture daroczig · Jun 12, 2011

You can include well formatted HTML code in textile:

|Model:||Ford <br/> BMW <br/> VM||

Just try it on textile.thresholdstate.com.

As the above homepage says: HTML code should be wrapped besides ==, this way calling the following would result in the required output:

|Model:||Ford ==<br>== BMW ==<br>== VM||

Both method works for me :)

Besides this obvious way you could build a table with colspan, so not using manual breaklines but having the second column have 3 rows while only one in the first:

|/3. Models: | Ford |
| BMV |
| VM |

Resulting in:

<table>
        <tr>
            <td rowspan="3">Models: </td>
            <td> Ford </td>
        </tr>
        <tr>
            <td> BMV </td>
        </tr>
        <tr>
            <td> VM </td>
        </tr>
</table>