aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/nodes/ScriptingBox.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index 93956592f..4159bbed4 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -39,6 +39,22 @@ export class ScriptingBox extends DocAnnotatableComponent<FieldViewProps, Script
}
@action
+ onSave = () => {
+ const result = CompileScript(this.rawScript, {});
+ this._errorMessage = "";
+ if (result.compiled) {
+ this._errorMessage = "";
+ this.props.Document.data = new ScriptField(result);
+
+ //button
+ }
+ else {
+ //
+ }
+ this.props.Document.documentText = this.rawScript;
+ }
+
+ @action
onCompile = () => {
const params = this.compileParams.reduce((o: ScriptParam, p: string) => { o[p] = "any"; return o; }, {} as ScriptParam);
const result = CompileScript(this.rawScript, {