diff options
author | Go MAEDA <maeda@farend.jp> | 2020-03-04 14:02:10 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-03-04 14:02:10 +0000 |
commit | a748b9ba58cdcf808aa80261e47d283cb71f0e2c (patch) | |
tree | 1581fd4251d20d8aa257e2e6dbf4bdb013cbf5f8 /public/javascripts/jstoolbar/textile.js | |
parent | db2118fd82690a3ca5ecc1a8f96127e572bd9ac1 (diff) | |
download | redmine-a748b9ba58cdcf808aa80261e47d283cb71f0e2c.tar.gz redmine-a748b9ba58cdcf808aa80261e47d283cb71f0e2c.zip |
Toolbar button to insert a table (#1575).
Patch by Mizuki ISHIKAWA and Hiroyuki ENDO.
git-svn-id: http://svn.redmine.org/redmine/trunk@19561 e93f8b46-1217-0410-a6f0-8f06a7374b81
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', |