blob: a0732609557b0c940a74c7b387ca5024fb8928cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { BasicField } from "./BasicField";
import { Types } from "../server/Message";
import { FieldId } from "./Field";
export class HtmlField extends BasicField<string> {
constructor(data: string = "<html></html>", id?: FieldId, save: boolean = true) {
super(data, save, id);
}
ToScriptString(): string {
return `new HtmlField("${this.Data}")`;
}
Copy() {
return new HtmlField(this.Data);
}
ToJson(): { _id: string; type: Types; data: any; } {
return {
type: Types.Html,
data: this.Data,
_id: this.Id,
}
}
}
|