mirror of https://github.com/status-im/codimd.git
Expose internal editor config variable
This commit is contained in:
parent
db06a51299
commit
c6c11c54ef
|
@ -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) {
|
||||
|
|
|
@ -119,6 +119,7 @@ export default class Editor {
|
|||
}
|
||||
}
|
||||
this.eventListeners = {}
|
||||
this.config = config
|
||||
}
|
||||
|
||||
on (event, cb) {
|
||||
|
|
Loading…
Reference in New Issue