Textile: line breaks in table cells
Asked Answered
S

2

8

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.

Sightless answered 11/6, 2011 at 13:11 Comment(0)
E
9

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>
Extramural answered 12/6, 2011 at 20:38 Comment(2)
I think you meant rowspan instead of colspan. That's how I solved it in the end.Sightless
That is right @Pickels, it was to be rowspan, thanks for feedback! I am happy this could work out for you. If you liked my answer please upvote/accept.Extramural
O
3
|Model:|Ford
BMW
VM|

should do.. however might be depending on the textile parser you are using.

Regarding the above mentioned textile.thresholdstate.com : afaik they use a rather outdated textile parser.. the current PHP implementation (as used in textpattern) can be found at github.com/netcarver/textile, with it's test site being here: textile.sitemonks.com

Orthodoxy answered 14/7, 2013 at 15:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.