PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.1 2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 All 31 releases
bbp-core / lib / bbpress / templates / default / js / editor.js

editor.js in Forumax – AI Powered Advanced Community Forum Plugin 2.5.0, at lib/bbpress/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 /* global edButtons, QTags, tinymce */
2 jQuery(document).ready( function() {
3
4 /* Use backticks instead of <code> for the Code button in the editor */
5 if ( typeof( edButtons ) !== 'undefined' ) {
6 edButtons[110] = new QTags.TagButton( 'code', 'code', '`', '`', 'c' );
7 QTags._buttonsInit();
8 }
9
10 /* Tab from topic title */
11 jQuery( '#bbp_topic_title' ).bind( 'keydown.editor-focus', function(e) {
12 if ( e.which !== 9 ) {
13 return;
14 }
15
16 if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) {
17 if ( typeof( tinymce ) !== 'undefined' ) {
18 if ( ! tinymce.activeEditor.isHidden() ) {
19 var editor = tinymce.activeEditor.editorContainer;
20 jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
21 } else {
22 jQuery( 'textarea.bbp-the-content' ).focus();
23 }
24 } else {
25 jQuery( 'textarea.bbp-the-content' ).focus();
26 }
27
28 e.preventDefault();
29 }
30 });
31
32 /* Shift + tab from topic tags */
33 jQuery( '#bbp_topic_tags' ).bind( 'keydown.editor-focus', function(e) {
34 if ( e.which !== 9 ) {
35 return;
36 }
37
38 if ( e.shiftKey && !e.ctrlKey && !e.altKey ) {
39 if ( typeof( tinymce ) !== 'undefined' ) {
40 if ( ! tinymce.activeEditor.isHidden() ) {
41 var editor = tinymce.activeEditor.editorContainer;
42 jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
43 } else {
44 jQuery( 'textarea.bbp-the-content' ).focus();
45 }
46 } else {
47 jQuery( 'textarea.bbp-the-content' ).focus();
48 }
49
50 e.preventDefault();
51 }
52 });
53 });