diff options
| author | bob <bcz@cs.brown.edu> | 2019-11-13 11:44:52 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-11-13 11:44:52 -0500 |
| commit | e1930a62304db60d9eca542148995c5d03b79aea (patch) | |
| tree | 0efd8b0083cd80e3f9f265fb39a3283807183367 /src/new_fields/RichTextField.ts | |
| parent | 76411ba009c4265751431d255ab3cc9a3cfab69f (diff) | |
fixed search on client/server to work with richTextFields. got rid of 'text' field on richtextfield extensions.
Diffstat (limited to 'src/new_fields/RichTextField.ts')
| -rw-r--r-- | src/new_fields/RichTextField.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/new_fields/RichTextField.ts b/src/new_fields/RichTextField.ts index d2f76c969..fd5459876 100644 --- a/src/new_fields/RichTextField.ts +++ b/src/new_fields/RichTextField.ts @@ -10,17 +10,21 @@ export class RichTextField extends ObjectField { @serializable(true) readonly Data: string; - constructor(data: string) { + @serializable(true) + readonly Text: string; + + constructor(data: string, text: string = "") { super(); this.Data = data; + this.Text = text; } [Copy]() { - return new RichTextField(this.Data); + return new RichTextField(this.Data, this.Text); } [ToScriptString]() { - return `new RichTextField("${this.Data}")`; + return `new RichTextField("${this.Data}", "${this.Text}")`; } }
\ No newline at end of file |
