mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
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 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 a new issue