mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
added comments
This commit is contained in:
parent
dc6110db8d
commit
bd09ef81f2
1 changed files with 3 additions and 2 deletions
|
@ -356,7 +356,7 @@ define [
|
||||||
session.setOption("useWorker", scope.syntaxValidation);
|
session.setOption("useWorker", scope.syntaxValidation);
|
||||||
|
|
||||||
# now attach session to editor
|
# now attach session to editor
|
||||||
editor.setReadOnly(true)
|
editor.setReadOnly(true) # set to readonly until document change handlers are attached
|
||||||
editor.setSession(session)
|
editor.setSession(session)
|
||||||
|
|
||||||
doc = session.getDocument()
|
doc = session.getDocument()
|
||||||
|
@ -365,7 +365,8 @@ define [
|
||||||
editor.initing = true
|
editor.initing = true
|
||||||
sharejs_doc.attachToAce(editor)
|
sharejs_doc.attachToAce(editor)
|
||||||
editor.initing = false
|
editor.initing = false
|
||||||
editor.setReadOnly(false)
|
# now ready to edit document
|
||||||
|
editor.setReadOnly(scope.readOnly) # respect the readOnly setting, normally false
|
||||||
|
|
||||||
resetScrollMargins()
|
resetScrollMargins()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue