File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ import {
7878import { preventXSS } from './render'
7979
8080import Editor from './lib/editor'
81- import EditorConfig from './lib/editor/config'
8281
8382import getUIElements from './lib/editor/ui-elements'
8483
@@ -446,7 +445,7 @@ $(document).ready(function () {
446445 /* we need this only on touch devices */
447446 if ( window . isTouchDevice ) {
448447 /* cache dom references */
449- var $body = jQuery ( 'body' )
448+ var $body = $ ( 'body' )
450449
451450 /* bind events */
452451 $ ( document )
@@ -2082,8 +2081,8 @@ socket.on('permission', function (data) {
20822081var permission = null
20832082socket . on ( 'refresh' , function ( data ) {
20842083 // console.log(data);
2085- EditorConfig . docmaxlength = data . docmaxlength
2086- editor . setOption ( 'maxLength' , EditorConfig . docmaxlength )
2084+ editorInstance . config . docmaxlength = data . docmaxlength
2085+ editor . setOption ( 'maxLength' , editorInstance . config . docmaxlength )
20872086 updateInfo ( data )
20882087 updatePermission ( data . permission )
20892088 if ( ! window . loaded ) {
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ export default class Editor {
119119 }
120120 }
121121 this . eventListeners = { }
122+ this . config = config
122123 }
123124
124125 on ( event , cb ) {
You can’t perform that action at this time.
0 commit comments