web/elements: insert spaces instead of tabs in codemirror
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -112,6 +112,12 @@ export class CodeMirrorTextarea extends LitElement {
|
|||||||
autoRefresh: true,
|
autoRefresh: true,
|
||||||
lineWrapping: true,
|
lineWrapping: true,
|
||||||
value: this._value,
|
value: this._value,
|
||||||
|
extraKeys: {
|
||||||
|
Tab: (cm) => {
|
||||||
|
cm.execCommand("insertSoftTab");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
indentUnit: 4,
|
||||||
});
|
});
|
||||||
this.editor.on("blur", () => {
|
this.editor.on("blur", () => {
|
||||||
this.editor?.save();
|
this.editor?.save();
|
||||||
|
|||||||
Reference in New Issue
Block a user