'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabDropdown.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabEvent.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabImage.js?v={@LAST_UPDATE_TIME}',
+ '{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabInlineCode.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabLink.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabMedia.js?v={@LAST_UPDATE_TIME}',
'{@$__wcf->getPath()}js/3rdParty/redactor2/plugins/WoltLabMention.js?v={@LAST_UPDATE_TIME}',
'WoltLabDropdown',
'WoltLabEvent',
'WoltLabImage',
+ 'WoltLabInlineCode',
'WoltLabLink',
'WoltLabModal',
'WoltLabQuote',
--- /dev/null
+$.Redactor.prototype.WoltLabInlineCode = function() {
+ "use strict";
+
+ return {
+ init: function() {
+ this.opts.activeButtonsStates.kbd = 'tt';
+
+ require(['EventHandler'], (function (EventHandler) {
+ EventHandler.add('com.woltlab.wcf.redactor2', 'bbcode_tt_' + this.$element[0].id, (function(data) {
+ data.cancel = true;
+
+ this.button.toggle({}, 'kbd', 'func', 'inline.format');
+ }).bind(this));
+ }).bind(this));
+ }
+ };
+};
--- /dev/null
+.inlineCode, /* deprecated, legacy class */
+kbd {
+ background-color: rgba(255, 255, 255, 1) !important;
+ border: 1px solid rgba(196, 196, 196, 1) !important;
+ border-radius: 2px;
+ color: rgba(68, 68, 68, 1) !important;
+ display: inline-block;
+ font-family: Consolas, 'Courier New', monospace;
+ margin: 0 2px;
+ padding: 0 4px;
+ word-break: break-all;
+ word-wrap: break-word;
+}