diff options
author | bobzel <zzzman@gmail.com> | 2019-02-27 00:01:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 00:01:11 -0500 |
commit | 609dc8f234f6eafdd5c7ed3f7040fff169bf266a (patch) | |
tree | 133da1d566c0fb37e14c84494aa14edef7ed6bd8 /src/fields/Document.ts | |
parent | 04ee2ad6e7ca887c3cfc7277c4b382f936c0fa6d (diff) | |
parent | 14d6495e4d4b9d38a37187a50ebeb84057abbc20 (diff) |
Merge pull request #7 from browngraphicslab/web_box
Web box
Diffstat (limited to 'src/fields/Document.ts')
-rw-r--r-- | src/fields/Document.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fields/Document.ts b/src/fields/Document.ts index 6193ea56c..5b91de6ed 100644 --- a/src/fields/Document.ts +++ b/src/fields/Document.ts @@ -8,6 +8,7 @@ import { ListField } from "./ListField"; import { Server } from "../client/Server"; import { Types } from "../server/Message"; import { UndoManager } from "../client/util/UndoManager"; +import { HtmlField } from "./HtmlField"; export class Document extends Field { public fields: ObservableMap<string, { key: Key, field: Field }> = new ObservableMap(); @@ -125,6 +126,10 @@ export class Document extends Field { return vval; } + GetHtml(key: Key, defaultVal: string): string { + return this.GetData(key, HtmlField, defaultVal); + } + GetNumber(key: Key, defaultVal: number): number { return this.GetData(key, NumberField, defaultVal); } |