See other users' cursor position
This commit is contained in:
@@ -9,6 +9,13 @@
|
||||
@color: @colortheme_code-color
|
||||
);
|
||||
|
||||
.cp-codemirror-cursor {
|
||||
border-left: 2px solid red;
|
||||
}
|
||||
.cp-codemirror-selection {
|
||||
background-color: rgba(255,0,0,0.3);
|
||||
}
|
||||
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
max-height: 100%;
|
||||
|
||||
@@ -301,6 +301,13 @@ define([
|
||||
return content;
|
||||
});
|
||||
|
||||
framework.onCursorUpdate(CodeMirror.setRemoteCursor);
|
||||
framework.setCursorGetter(CodeMirror.getCursor);
|
||||
editor.on('cursorActivity', function () {
|
||||
if (editor._noCursorUpdate) { console.log('ok'); return; }
|
||||
framework.updateCursor();
|
||||
});
|
||||
|
||||
framework.onEditableChange(function () {
|
||||
editor.setOption('readOnly', framework.isLocked() || framework.isReadOnly());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user