Изменить 'ace/index.html'

This commit is contained in:
KaiSD committed 2019-09-03 19:05:52 +02:00
1 parent a85e09aa28
commit 7fd7924924
1 file changed
+4 -2
+4 -2
View File
@@ -40,8 +40,10 @@
autoScrollEditorIntoView: true
})
editor.setValue(localStorage.getItem("acetest"));
editor.clearSelection();
if (localStorage.getItem("acetest") === null) {
editor.setValue(localStorage.getItem("acetest"));
editor.clearSelection();
}
editor.getSession().on('change', function () {
localStorage.setItem("acetest", editor.getSession().getValue());