Add sqlformat support

This commit is contained in:
Spxg
2025-05-27 01:04:02 +08:00
parent 9bc627488a
commit 5f88554db9
13 changed files with 359 additions and 143 deletions

View File

@@ -28,6 +28,9 @@ mod bindgen {
#[wasm_bindgen(method, js_name = getValue)]
pub fn get_value(this: &Editor) -> String;
#[wasm_bindgen(method, js_name = setValue)]
pub fn set_value(this: &Editor, value: String);
#[wasm_bindgen(method, js_name = getSelectedText)]
pub fn get_selected_text(this: &Editor) -> String;
}
@@ -201,6 +204,10 @@ impl Editor {
self.js.get_value()
}
pub fn set_value(&self, value: String) {
self.js.set_value(value);
}
pub fn get_selected_value(&self) -> String {
self.js.get_selected_text()
}