aboutsummaryrefslogtreecommitdiff
path: root/src/fields/HtmlField.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-27 04:21:08 -0500
committerbobzel <zzzman@gmail.com>2024-01-27 04:21:08 -0500
commite3709b4445732791f696cdf26274ab09294ce208 (patch)
tree2c1b0e51b3609e6284f499e3a3a851dd8b26da58 /src/fields/HtmlField.ts
parentcdbe62da5c62f809629f4e8b01524b223f38abd4 (diff)
made dataViz nodes linked to schema nodes update automatically as cahnges are made. fixed user created templates from disappearing from menu, and made them work. added toJavascriptString and made DashField views convert to text. added support for turning text into javascript rendering (paint) code.
Diffstat (limited to 'src/fields/HtmlField.ts')
-rw-r--r--src/fields/HtmlField.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/fields/HtmlField.ts b/src/fields/HtmlField.ts
index 6e8bba977..b67f0f7e9 100644
--- a/src/fields/HtmlField.ts
+++ b/src/fields/HtmlField.ts
@@ -1,9 +1,9 @@
-import { Deserializable } from "../client/util/SerializationHelper";
-import { serializable, primitive } from "serializr";
-import { ObjectField } from "./ObjectField";
-import { Copy, ToScriptString, ToString} from "./FieldSymbols";
+import { Deserializable } from '../client/util/SerializationHelper';
+import { serializable, primitive } from 'serializr';
+import { ObjectField } from './ObjectField';
+import { Copy, ToJavascriptString, ToScriptString, ToString } from './FieldSymbols';
-@Deserializable("html")
+@Deserializable('html')
export class HtmlField extends ObjectField {
@serializable(primitive())
readonly html: string;
@@ -17,8 +17,11 @@ export class HtmlField extends ObjectField {
return new HtmlField(this.html);
}
+ [ToJavascriptString]() {
+ return 'invalid';
+ }
[ToScriptString]() {
- return "invalid";
+ return 'invalid';
}
[ToString]() {
return this.html;