diff options
Diffstat (limited to 'public/javascripts/jstoolbar/textile.js')
-rw-r--r-- | public/javascripts/jstoolbar/textile.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/public/javascripts/jstoolbar/textile.js b/public/javascripts/jstoolbar/textile.js index 40bc04094..9adc77add 100644 --- a/public/javascripts/jstoolbar/textile.js +++ b/public/javascripts/jstoolbar/textile.js @@ -170,6 +170,23 @@ jsToolBar.prototype.elements.unbq = { } } +// table +jsToolBar.prototype.elements.table = { + type: 'button', + title: 'Table', + fn: { + wiki: function() { + var This = this; + this.tableMenu(function(cols, rowCount){ + This.encloseLineSelection( + '|_.'+cols.join('|_.')+'|\n' + // header + Array(rowCount+1).join(Array(cols.length+1).join('| ')+'|\n') // cells + ); + }); + } + } +} + // pre jsToolBar.prototype.elements.pre = { type: 'button', |