@@ -455,6 +455,7 @@ window.editor = CodeMirror.fromTextArea(textit, {
455455 addModeClass : true ,
456456 readOnly : true ,
457457 autoRefresh : true ,
458+ otherCursors : true ,
458459 placeholder : "← Start by entering a title here\n===\nVisit /features if you don't know what to do.\nHappy hacking :)"
459460} ) ;
460461var inlineAttach = inlineAttachment . editors . codemirror4 . attach ( editor ) ;
@@ -2719,7 +2720,7 @@ socket.on('online users', function (data) {
27192720 console . debug ( data ) ;
27202721 onlineUsers = data . users ;
27212722 updateOnlineStatus ( ) ;
2722- $ ( '.other-cursors' ) . children ( ) . each ( function ( key , value ) {
2723+ $ ( '.CodeMirror- other-cursors' ) . children ( ) . each ( function ( key , value ) {
27232724 var found = false ;
27242725 for ( var i = 0 ; i < data . users . length ; i ++ ) {
27252726 var user = data . users [ i ] ;
@@ -3044,11 +3045,11 @@ function buildCursor(user) {
30443045 iconClass = 'fa-desktop' ;
30453046 break ;
30463047 }
3047- if ( $ ( '.other-cursors' ) . length <= 0 ) {
3048- $ ( "<div class='other-cursors'>" ) . insertAfter ( '.CodeMirror-cursors' ) ;
3048+ if ( $ ( '.CodeMirror- other-cursors' ) . length <= 0 ) {
3049+ $ ( "<div class='CodeMirror- other-cursors'>" ) . insertAfter ( '.CodeMirror-cursors' ) ;
30493050 }
30503051 if ( $ ( 'div[data-clientid="' + user . id + '"]' ) . length <= 0 ) {
3051- var cursor = $ ( '<div data-clientid="' + user . id + '" class="other-cursor" style="display:none;"></div>' ) ;
3052+ var cursor = $ ( '<div data-clientid="' + user . id + '" class="CodeMirror- other-cursor" style="display:none;"></div>' ) ;
30523053 cursor . attr ( 'data-line' , user . cursor . line ) ;
30533054 cursor . attr ( 'data-ch' , user . cursor . ch ) ;
30543055 cursor . attr ( 'data-offset-left' , 0 ) ;
@@ -3119,7 +3120,7 @@ function buildCursor(user) {
31193120
31203121 cursor [ 0 ] . style . left = coord . left + 'px' ;
31213122 cursor [ 0 ] . style . top = coord . top + 'px' ;
3122- $ ( '.other-cursors' ) . append ( cursor ) ;
3123+ $ ( '.CodeMirror- other-cursors' ) . append ( cursor ) ;
31233124
31243125 if ( ! user . idle )
31253126 cursor . stop ( true ) . fadeIn ( ) ;
@@ -3622,8 +3623,8 @@ function checkCursorMenuInner() {
36223623 // get cursor
36233624 var cursor = editor . getCursor ( ) ;
36243625 // set element cursor data
3625- if ( ! dropdown . hasClass ( 'other-cursor' ) )
3626- dropdown . addClass ( 'other-cursor' ) ;
3626+ if ( ! dropdown . hasClass ( 'CodeMirror- other-cursor' ) )
3627+ dropdown . addClass ( 'CodeMirror- other-cursor' ) ;
36273628 dropdown . attr ( 'data-line' , cursor . line ) ;
36283629 dropdown . attr ( 'data-ch' , cursor . ch ) ;
36293630 // get coord position
0 commit comments