diff options
Diffstat (limited to '')
-rw-r--r-- | public/js/index.js | 7 | ||||
-rw-r--r-- | public/js/lib/editor/index.js | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js index 9a8ee11f..d34bfa93 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -78,7 +78,6 @@ import { import { preventXSS } from './render' import Editor from './lib/editor' -import EditorConfig from './lib/editor/config' import getUIElements from './lib/editor/ui-elements' @@ -446,7 +445,7 @@ $(document).ready(function () { /* we need this only on touch devices */ if (window.isTouchDevice) { /* cache dom references */ - var $body = jQuery('body') + var $body = $('body') /* bind events */ $(document) @@ -2082,8 +2081,8 @@ socket.on('permission', function (data) { var permission = null socket.on('refresh', function (data) { // console.log(data); - EditorConfig.docmaxlength = data.docmaxlength - editor.setOption('maxLength', EditorConfig.docmaxlength) + editorInstance.config.docmaxlength = data.docmaxlength + editor.setOption('maxLength', editorInstance.config.docmaxlength) updateInfo(data) updatePermission(data.permission) if (!window.loaded) { diff --git a/public/js/lib/editor/index.js b/public/js/lib/editor/index.js index 8cab486c..2991998b 100644 --- a/public/js/lib/editor/index.js +++ b/public/js/lib/editor/index.js @@ -119,6 +119,7 @@ export default class Editor { } } this.eventListeners = {} + this.config = config } on (event, cb) { |