mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 19:46:55 +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" },
|
||||
});
|
||||
}
|
||||
if (this.submit) {
|
||||
editor.commands.addCommand({
|
||||
name: "submit",
|
||||
exec: () => {
|
||||
this.submit();
|
||||
},
|
||||
bindKey: { mac: "cmd-enter", win: "ctrl-enter" },
|
||||
});
|
||||
}
|
||||
|
||||
editor.on("blur", () => {
|
||||
this.warnSCSSDeprecations();
|
||||
|
|
Loading…
Reference in New Issue
Block a user