blob: 65665cf7a02cffd8d5f41783e67b470fc0ee6bd1 (
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: string; } {
        return {
            type: Types.Html,
            data: this.Data,
            _id: this.Id,
        };
    }
}
 |