Expose internal editor config variable
This commit is contained in:
parent
db06a51299
commit
c6c11c54ef
2 changed files with 4 additions and 4 deletions
|
@ -78,7 +78,6 @@ import {
|
||||||
import { preventXSS } from './render'
|
import { preventXSS } from './render'
|
||||||
|
|
||||||
import Editor from './lib/editor'
|
import Editor from './lib/editor'
|
||||||
import EditorConfig from './lib/editor/config'
|
|
||||||
|
|
||||||
import getUIElements from './lib/editor/ui-elements'
|
import getUIElements from './lib/editor/ui-elements'
|
||||||
|
|
||||||
|
@ -446,7 +445,7 @@ $(document).ready(function () {
|
||||||
/* we need this only on touch devices */
|
/* we need this only on touch devices */
|
||||||
if (window.isTouchDevice) {
|
if (window.isTouchDevice) {
|
||||||
/* cache dom references */
|
/* cache dom references */
|
||||||
var $body = jQuery('body')
|
var $body = $('body')
|
||||||
|
|
||||||
/* bind events */
|
/* bind events */
|
||||||
$(document)
|
$(document)
|
||||||
|
@ -2082,8 +2081,8 @@ socket.on('permission', function (data) {
|
||||||
var permission = null
|
var permission = null
|
||||||
socket.on('refresh', function (data) {
|
socket.on('refresh', function (data) {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
EditorConfig.docmaxlength = data.docmaxlength
|
editorInstance.config.docmaxlength = data.docmaxlength
|
||||||
editor.setOption('maxLength', EditorConfig.docmaxlength)
|
editor.setOption('maxLength', editorInstance.config.docmaxlength)
|
||||||
updateInfo(data)
|
updateInfo(data)
|
||||||
updatePermission(data.permission)
|
updatePermission(data.permission)
|
||||||
if (!window.loaded) {
|
if (!window.loaded) {
|
||||||
|
|
|
@ -119,6 +119,7 @@ export default class Editor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.eventListeners = {}
|
this.eventListeners = {}
|
||||||
|
this.config = config
|
||||||
}
|
}
|
||||||
|
|
||||||
on (event, cb) {
|
on (event, cb) {
|
||||||
|
|
Loading…
Reference in a new issue