summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index c6a4f770..5e0aded6 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -30,6 +30,8 @@ import {
import {
debug,
DROPBOX_APP_KEY,
+ GOOGLE_API_KEY,
+ GOOGLE_CLIENT_ID,
noteid,
noteurl,
urlpath,
@@ -566,6 +568,9 @@ var previousFocusOnEditor = null
function checkEditorStyle () {
var desireHeight = editorInstance.statusBar ? (ui.area.edit.height() - editorInstance.statusBar.outerHeight()) : ui.area.edit.height()
+ if (editorInstance.toolBar) {
+ desireHeight = desireHeight - editorInstance.toolBar.outerHeight()
+ }
// set editor height and min height based on scrollbar style and mode
var scrollbarStyle = editor.getOption('scrollbarStyle')
if (scrollbarStyle === 'overlay' || appState.currentMode === modeType.both) {
@@ -804,6 +809,10 @@ function changeMode (type) {
editorInstance.addStatusBar()
editorInstance.updateStatusBar()
}
+ // add and update tool bar
+ if (!editorInstance.toolBar) {
+ editorInstance.addToolBar()
+ }
// work around foldGutter might not init properly
editor.setOption('foldGutter', false)
editor.setOption('foldGutter', true)