PluginProbe
bbPress / 2.6.17
bbPress v2.6.17
2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 2.2 2.2.1 All 72 releases
bbpress / templates / default / js / editor.js

editor.js in bbPress 2.6.17, at templates/default/js/editor.js

53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery(document).ready( function() {
2
3 /* Use backticks instead of <code> for the Code button in the editor */
4 if ( typeof( edButtons ) !== 'undefined' ) {
5 edButtons[110] = new QTags.TagButton( 'code', 'code', '`', '`', 'c' );
6 QTags._buttonsInit();
7 }
8
9 /* Tab from topic title */
10 jQuery( '#bbp_topic_title' ).bind( 'keydown.editor-focus', function(e) {
11 if ( e.which !== 9 ) {
12 return;
13 }
14
15 if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) {
16 if ( typeof( tinymce ) !== 'undefined' ) {
17 if ( ! tinymce.activeEditor.isHidden() ) {
18 var editor = tinymce.activeEditor.editorContainer;
19 jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
20 } else {
21 jQuery( 'textarea.bbp-the-content' ).focus();
22 }
23 } else {
24 jQuery( 'textarea.bbp-the-content' ).focus();
25 }
26
27 e.preventDefault();
28 }
29 });
30
31 /* Shift + tab from topic tags */
32 jQuery( '#bbp_topic_tags' ).bind( 'keydown.editor-focus', function(e) {
33 if ( e.which !== 9 ) {
34 return;
35 }
36
37 if ( e.shiftKey && !e.ctrlKey && !e.altKey ) {
38 if ( typeof( tinymce ) !== 'undefined' ) {
39 if ( ! tinymce.activeEditor.isHidden() ) {
40 var editor = tinymce.activeEditor.editorContainer;
41 jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
42 } else {
43 jQuery( 'textarea.bbp-the-content' ).focus();
44 }
45 } else {
46 jQuery( 'textarea.bbp-the-content' ).focus();
47 }
48
49 e.preventDefault();
50 }
51 });
52 });
53