aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/HtmlField.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/new_fields/HtmlField.ts')
-rw-r--r--src/new_fields/HtmlField.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/new_fields/HtmlField.ts b/src/new_fields/HtmlField.ts
new file mode 100644
index 000000000..d998746bb
--- /dev/null
+++ b/src/new_fields/HtmlField.ts
@@ -0,0 +1,18 @@
+import { Deserializable } from "../client/util/SerializationHelper";
+import { serializable, primitive } from "serializr";
+import { ObjectField, Copy } from "./ObjectField";
+
+@Deserializable("html")
+export class HtmlField extends ObjectField {
+ @serializable(primitive())
+ readonly html: string;
+
+ constructor(html: string) {
+ super();
+ this.html = html;
+ }
+
+ [Copy]() {
+ return new HtmlField(this.html);
+ }
+}