diff options
author | ab <abdullah_ahmed@brown.edu> | 2019-03-09 15:59:36 -0500 |
---|---|---|
committer | ab <abdullah_ahmed@brown.edu> | 2019-03-09 15:59:36 -0500 |
commit | 30b082a9d94465ae24d9c392843518e8df2c9d66 (patch) | |
tree | 01c464b96defe06b2c99e8e298b9287901d4d9b0 /src/fields/RichTextField.ts | |
parent | 12d20ab1b9b843d816bde445d9b67b3aa6abc6ae (diff) | |
parent | 96eede5f7d1706a3f7ac6ee02a85bb3da217f467 (diff) |
merging
Diffstat (limited to 'src/fields/RichTextField.ts')
-rw-r--r-- | src/fields/RichTextField.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fields/RichTextField.ts b/src/fields/RichTextField.ts index 4a77c669c..5efb43314 100644 --- a/src/fields/RichTextField.ts +++ b/src/fields/RichTextField.ts @@ -1,8 +1,10 @@ import { BasicField } from "./BasicField"; +import { Types } from "../server/Message"; +import { FieldId } from "./Field"; export class RichTextField extends BasicField<string> { - constructor(data: string = "") { - super(data); + constructor(data: string = "", id?: FieldId, save: boolean = true) { + super(data, save, id); } ToScriptString(): string { @@ -13,4 +15,12 @@ export class RichTextField extends BasicField<string> { return new RichTextField(this.Data); } + ToJson(): { type: Types, data: string, _id: string } { + return { + type: Types.RichText, + data: this.Data, + _id: this.Id + } + } + }
\ No newline at end of file |