diff --git a/codepot/src/codepot/views/wiki_edit.php b/codepot/src/codepot/views/wiki_edit.php index 335321d5..5c60b07c 100644 --- a/codepot/src/codepot/views/wiki_edit.php +++ b/codepot/src/codepot/views/wiki_edit.php @@ -470,6 +470,25 @@ $(function () { $('#wiki_edit_text_preview').hide(); $(window).resize(resize_text_editor); resize_text_editor (); + + $('#wiki_edit_text_area').keydown (function(e) { + if (e.keyCode == 9) // capture a tab key to insert "\n". + { + // get caret position/selection + var start = this.selectionStart; + var end = this.selectionEnd; + + var $this = $(this); + var value = $this.val(); + + // set textarea value to: text before caret + tab + text after caret + $this.val(value.substring(0, start) + "\t" + value.substring(end)); + + // put caret at right position again (add one for the tab) + this.selectionStart = this.selectionEnd = start + 1; + e.preventDefault(); + } + }); }); diff --git a/codepot/src/codepot/views/wiki_editx.php b/codepot/src/codepot/views/wiki_editx.php index 4179aa6e..1ea40d46 100644 --- a/codepot/src/codepot/views/wiki_editx.php +++ b/codepot/src/codepot/views/wiki_editx.php @@ -368,7 +368,7 @@ $(function () { buttons: ['bold', 'italic', 'underline', 'strikethrough', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subscript', 'superscript', 'removeFormat', - 'quote', 'pre', 'anchor', 'image', + 'pre', 'anchor', 'image', 'orderedlist', 'unorderedlist', 'indent', 'outdent', 'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull', 'table'], @@ -396,6 +396,67 @@ $(function () { cleanTags: ['meta'] }, + keyboardCommands: { + commands: [ + { // ctrl-b + command: 'bold', + key: 'B', + meta: true, + shift: false, + alt: false + }, + { // ctrl-i + command: 'italic', + key: 'I', + meta: true, + shift: false, + alt: false + }, + { // ctrl-u + command: 'underline', + key: 'U', + meta: true, + shift: false, + alt: false + }, + { // alt-i + command: 'indent', + key: 'I', + meta: false, + shift: false, + alt: true + }, + { // alt-o + command: 'outdent', + key: 'O', + meta: false, + shift: false, + alt: true + }, + { // alt-l + command: 'insertUnorderedList', + key: 'L', + meta: false, + shift: false, + alt: true + }, + { // alt-p + command: 'append-pre', + key: 'P', + meta: false, + shift: false, + alt: true + }, + { // alt-h + command: 'append-h1', + key: 'H', + meta: false, + shift: false, + alt: true + } + ] + }, + extensions: { table: new MediumEditorTable() } diff --git a/codepot/src/css/common.css b/codepot/src/css/common.css index ada21335..dcd705e3 100644 --- a/codepot/src/css/common.css +++ b/codepot/src/css/common.css @@ -603,7 +603,7 @@ pre, code, tt { span.codepot-open-issue-count { -moz-border-radius: 45%; -webkit-border-radius: 45%; - border-radius: 45%; + border-radius: 30%; background-color: #BB4444; color: white; font-weight: bold; @@ -814,8 +814,9 @@ span.codepot-open-issue-count { .codepot-plain-text-view blockquote, .codepot-styled-text-view blockquote, .codepot-styled-text-preview blockquote { - background: #F5F5F5; - border-left: 5px solid #CCCCCC; + /*background: #F5F5F5;*/ + background: inherit; + border-left: 3px solid #EEEEEE; margin: 1em 1em 1em 1em; padding: 0.5em 0.5em 0.5em 0.5em; } @@ -875,7 +876,8 @@ span.codepot-open-issue-count { .codepot-styled-text-preview blockquote pre { border: none; margin: 0; - background-color: inherit; + /*background-color: inherit;*/ + background-color: #F5F5F5; } .codepot-styled-code-view pre,