mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-01 13:37:47 +00:00
Move save to the instance
This commit is contained in:
parent
95e9d6164d
commit
e789380126
@ -19,9 +19,6 @@ export class HuiYamlEditor extends HTMLElement {
|
||||
|
||||
public constructor() {
|
||||
super();
|
||||
CodeMirror.commands.save = () => {
|
||||
fireEvent(this, "yaml-save");
|
||||
};
|
||||
this._value = "";
|
||||
const shadowRoot = this.attachShadow({ mode: "open" });
|
||||
shadowRoot.innerHTML = `
|
||||
@ -77,6 +74,9 @@ export class HuiYamlEditor extends HTMLElement {
|
||||
},
|
||||
},
|
||||
});
|
||||
this.codemirror.commands.save = () => {
|
||||
fireEvent(this, "yaml-save");
|
||||
};
|
||||
fireEvent(this, "yaml-changed", { value: this._value });
|
||||
this.codemirror.on("changes", () => this._onChange());
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user