Textile formatting is used in numerous wiki applications and other places where easy formatting is needed for text input fields without using a WYSIWYG interface. Currently I am using textile a bunch because I spend at least some time every day adding tickets, updating tickets, and adding/modifying wiki pages in Redmine. In Redmine you have the option of using Textile formatting or no formatting by default. If anyone is on the fence regarding Textile formatting I suggest you give it a chance as it grows on you after a short amount of time.
There are a couple different ways to outline each cell within a table created using textile. Below I will explain two options available to put a border around each cell. First lets explain how to create a basic table of cell provider email addresses using Textile.
Basic Five Row Table With Header Row Created Using Textile:
- |_. Provider |_. Text Email Address|_. Verified?|
- |3 River Wireless|10digitphonenumber@sms.3rivers.net |*Not Verified* |
- |ACS Wireless|10digitphonenumber@paging.acswireless.com |*Not Verified* |
- |Alltel|10digitphonenumber@message.alltel.com |*Not Verified* |
- |AT&T|10digitphonenumber@txt.att.net |VERIFIED |
- |Bell Canada|10digitphonenumber@txt.bellmobility.ca |*Not Verified* |
Same Table With Per Cell Formatting Using Textile:
- |_{border:2px solid black}. Provider |_{border:2px solid black}. Text Email Address|_{border:2px solid black}. Verified?|
- |{border:2px solid black}. 3 River Wireless|{border:2px solid black}. 10digitphonenumber@sms.3rivers.net |{border:2px solid black}. *Not Verified* |
- |{border:2px solid black}. ACS Wireless|{border:2px solid black}. 10digitphonenumber@paging.acswireless.com |{border:2px solid black}. *Not Verified* |
- |{border:2px solid black}. Alltel|{border:2px solid black}. 10digitphonenumber@message.alltel.com |{border:2px solid black}. *Not Verified* |
- |{border:2px solid black}. AT&T|{border:2px solid black}. 10digitphonenumber@txt.att.net |{border:2px solid black}. VERIFIED |
- |{border:2px solid black}. Bell Canada|{border:2px solid black}. 10digitphonenumber@txt.bellmobility.ca |{border:2px solid black}. *Not Verified* |
Same Table With Per Cell Borders Using CSS With Textile Formatting:
- table(#tableborders){border:2px solid black;font-family: georgia}.
- |_. Provider |_. Text Email Address|_. Verified?|
- |3 River Wireless|10digitphonenumber@sms.3rivers.net |*Not Verified* |
- |ACS Wireless|10digitphonenumber@paging.acswireless.com |*Not Verified* |
- |Alltel|10digitphonenumber@message.alltel.com |*Not Verified* |
- |AT&T|10digitphonenumber@txt.att.net |VERIFIED |
- |Bell Canada|10digitphonenumber@txt.bellmobility.ca |*Not Verified* |
The CSS used for the above example is displayed below:
- #tableborders td {border:2px solid black;}
So for my example using Redmine I added the above CSS to the application.css file in the redmine-root/public/stylesheets/ directory and now anywhere I need to create a table with borders I can simply add the “table(#tableborders).” text as the first line of the table. Textile will format this and use the CSS to put borders around each cell in the table.