Support run selected sql

This commit is contained in:
Spxg
2025-05-17 22:42:18 +08:00
parent 8931532310
commit 4848e73723
9 changed files with 197 additions and 11 deletions

View File

@@ -36,6 +36,9 @@ mod bindgen {
#[wasm_bindgen(method, js_name = getValue)]
pub fn get_value(this: &Editor) -> String;
#[wasm_bindgen(method, js_name = getSelectedText)]
pub fn get_selected_text(this: &Editor) -> String;
}
}
@@ -171,4 +174,8 @@ impl Editor {
pub fn get_value(&self) -> String {
self.js.get_value()
}
pub fn get_selected_value(&self) -> String {
self.js.get_selected_text()
}
}