|
Table Wiz
| |
This is a NoteTab Clip. Some version of NoteTab is required for use. |
First, let me say this is a SIMPLE wizard. I use it to "rough-in" a table... then go back and fiddle with the details. Yes, I could write a more complex NASA-inspired wizard that would attempt to fill in every conceivable attribute possible... but I won't. The end result would probably be a confusing mess.
This quick and dirty table wizard simply asks for rows, columns, border, cellspacing and cellpadding... then quickly and neatly whips up the table. From there you can fill in the cells and style up the table.
Grab the clip code below and do with it what you wish. You can place it within another clip library or in its own library. Name it whatever you wish.
^!Continue Table Wiz v1.0^%NL%a NoteTab clip by Joe Barta - HTMLisEasy.com^%NL%^%NL%Quick and dirty HTML table wizard with a minimum of table attributes.^%NL%^%NL%Click OK to proceed.
; =============================================================================
; Table Wiz v1.0
; a NoteTab clip by Joe Barta - HTMLisEasy.com
; https://www.htmliseasy.com/notetab/tablewiz.html
;
; Quick and dirty HTML table wizard.
; Full details and instructions at the web site above.
; =============================================================================
^!Set %rows%=^?[Rows=1]
^!Set %cols%=^?[Columns=1]
^!Set %b%=^?[Border=0]
^!Set %cp%=^?[Cellpadding=0]
^!Set %cs%=^?[Cellspacing=0]
^!Set %fill%=^?[Fill cells with= ]
^!Set %current_tr%=1
^!Set %current_td%=1
^!InsertText <table border="^%b%" cellpadding="^%cp%" cellspacing="^%cs%">^%NL%
:MAKE_TR
^!InsertText <tr>^%NL%
:MAKE_TD
^!InsertText ^%SPACE%^%SPACE%^%SPACE%<td>^%fill%</td>^%NL%
^!If ^%current_td% = ^%cols% CURRENT_ROW_DONE
^!Set %current_td%=^$Calc(^%current_td%+1)$
^!Goto MAKE_TD
:CURRENT_ROW_DONE
^!InsertText </tr>^%NL%
^!If ^%current_tr% = ^%rows% ALL_ROWS_DONE
^!Set %current_tr%=^$Calc(^%current_tr%+1)$
^!Set %current_td%=1
^!Goto MAKE_TR
:ALL_ROWS_DONE
^!InsertText </table>^%NL%
:EXIT