diff --git a/public/res/settings.js b/public/res/settings.js index 7884e92b..42d1aefa 100644 --- a/public/res/settings.js +++ b/public/res/settings.js @@ -7,7 +7,7 @@ define([ var settings = { layoutOrientation: "horizontal", lazyRendering: true, - editorFontFamily: '"Lucida Sans Typewriter", "Lucida Console", Monaco, "Bitstream Vera Sans Mono", monospace', + editorFontFamily: '"Lucida Sans Typewriter", "Lucida Console", Menlo, "Bitstream Vera Sans Mono", Courier, monospace', editorFontSize: 13, maxWidth: 960, defaultContent: "\n\n\n> Written with [StackEdit](" + constants.MAIN_URL + ").", diff --git a/public/res/storage.js b/public/res/storage.js index cafdb1b2..8f81fbc5 100644 --- a/public/res/storage.js +++ b/public/res/storage.js @@ -210,6 +210,17 @@ define([ version = "v12"; } + // Upgrade from v12 to v13 + if(version == "v12") { + if(_.has(localStorage, 'settings')) { + settings = JSON.parse(localStorage.settings); + // Have to reset the font because of Monaco issue with ACE + delete settings.editorFontFamily; + localStorage.settings = JSON.stringify(settings); + } + version = "v13"; + } + localStorage.version = version; return localStorage; }); \ No newline at end of file