From 2ca027ce9f852d2014303cf9f7388506b9e3bc1c Mon Sep 17 00:00:00 2001 From: JensLincke Date: Tue, 18 Jun 2024 15:12:15 +0200 Subject: [PATCH] added autorefresh SQUASHED: AUTO-COMMIT-src-components-widgets-lively-code-mirror.js, --- src/components/widgets/lively-code-mirror.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/widgets/lively-code-mirror.js b/src/components/widgets/lively-code-mirror.js index 398baeb28..de310651a 100644 --- a/src/components/widgets/lively-code-mirror.js +++ b/src/components/widgets/lively-code-mirror.js @@ -131,12 +131,10 @@ export default class LivelyCodeMirror extends HTMLElement { await this.loadModule("addon/scroll/annotatescrollbar.js"); await this.loadModule("addon/comment/comment.js"); await this.loadModule("addon/dialog/dialog.js"); - await this.loadModule("addon/scroll/simplescrollbars.js" - - //await System.import("https://raw.githubusercontent.com/jshint/jshint/master/dist/jshint.js"); - //await lively.loadJavaScriptThroughDOM("jshintAjax", "https://ajax.aspnetcdn.com/ajax/jshint/r07/jshint.js"); - //await lively.loadJavaScriptThroughDOM("eslint", "http://eslint.org/js/app/eslint.js"); - );await this.loadModule("addon/lint/lint.js"); + await this.loadModule("addon/scroll/simplescrollbars.js"); + await this.loadModule("addon/display/autorefresh.js"); + + await this.loadModule("addon/lint/lint.js"); await this.loadModule("addon/lint/javascript-lint.js"); await this.loadModule("addon/lint/html-lint.js"); @@ -662,6 +660,9 @@ export default class LivelyCodeMirror extends HTMLElement { editor.setOption("autoCloseTags", true); editor.setOption("scrollbarStyle", "simple"); editor.setOption("scrollbarStyle", "simple"); + + editor.setOption("autoRefresh", {delay: 10 }); + editor.setOption("tabSize", indentationWidth()); editor.setOption("indentWithTabs", false);