diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-04-10 08:44:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-04-10 08:44:49 +0000 |
commit | a3b188762adbfa0671809cd6539f65cfc479bf99 (patch) | |
tree | dd994741693d8accb54e245ebf072f7b21662865 /public/javascripts/jstoolbar/textile.js | |
parent | ffa4dd00f6a19c428d35dbd2e0e3b51db7459319 (diff) | |
download | redmine-a3b188762adbfa0671809cd6539f65cfc479bf99.tar.gz redmine-a3b188762adbfa0671809cd6539f65cfc479bf99.zip |
Inline code highlighting toolbar button (#14937).
git-svn-id: http://svn.redmine.org/redmine/trunk@15316 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts/jstoolbar/textile.js')
-rw-r--r-- | public/javascripts/jstoolbar/textile.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/public/javascripts/jstoolbar/textile.js b/public/javascripts/jstoolbar/textile.js index fa4030fc9..40bc04094 100644 --- a/public/javascripts/jstoolbar/textile.js +++ b/public/javascripts/jstoolbar/textile.js @@ -179,6 +179,20 @@ jsToolBar.prototype.elements.pre = { } } +// Code highlighting +jsToolBar.prototype.elements.precode = { + type: 'button', + title: 'Highlighted code', + fn: { + wiki: function() { + var This = this; + this.precodeMenu(function(lang){ + This.encloseLineSelection('<pre><code class="' + lang + '">\n', '\n</code></pre>\n'); + }); + } + } +} + // spacer jsToolBar.prototype.elements.space4 = {type: 'space'} |