mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 06:48:47 +08:00
DEV: add @submit hook for ace editor (#28010)
* DEV: add @commit hook for ace editor Add @commit hook to AceEditor to handle "save and run" in Data Explorer
This commit is contained in:
parent
fb7cc2d375
commit
0eeebeb6b1
|
@ -136,6 +136,15 @@ export default class AceEditor extends Component {
|
||||||
bindKey: { mac: "cmd-s", win: "ctrl-s" },
|
bindKey: { mac: "cmd-s", win: "ctrl-s" },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (this.submit) {
|
||||||
|
editor.commands.addCommand({
|
||||||
|
name: "submit",
|
||||||
|
exec: () => {
|
||||||
|
this.submit();
|
||||||
|
},
|
||||||
|
bindKey: { mac: "cmd-enter", win: "ctrl-enter" },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
editor.on("blur", () => {
|
editor.on("blur", () => {
|
||||||
this.warnSCSSDeprecations();
|
this.warnSCSSDeprecations();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user