diff options
| author | Eric <ericmabr@gmail.com> | 2023-08-13 16:08:28 -0400 |
|---|---|---|
| committer | Eric <ericmabr@gmail.com> | 2023-08-13 16:08:28 -0400 |
| commit | 0020ec69b847c8607affb57babddfddc812dc9b6 (patch) | |
| tree | e24255039015745d2073806bee97ce449ddb5260 /src/client/util/DictationManager.ts | |
| parent | 7b2553514bb000eb7f618eb0f0d653baee78742c (diff) | |
| parent | 3b45f1d30a947dc1702ec347b83e98374c5b603c (diff) | |
Merge branch 'master' into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/util/DictationManager.ts')
| -rw-r--r-- | src/client/util/DictationManager.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts index 1cce21034..717473aa1 100644 --- a/src/client/util/DictationManager.ts +++ b/src/client/util/DictationManager.ts @@ -5,7 +5,7 @@ import { Doc, Opt } from '../../fields/Doc'; import { List } from '../../fields/List'; import { RichTextField } from '../../fields/RichTextField'; import { listSpec } from '../../fields/Schema'; -import { Cast, CastCtor } from '../../fields/Types'; +import { Cast, CastCtor, DocCast } from '../../fields/Types'; import { AudioField, ImageField } from '../../fields/URLField'; import { Utils } from '../../Utils'; import { Docs } from '../documents/Documents'; @@ -328,7 +328,7 @@ export namespace DictationManager { { action: (target: DocumentView) => { const newBox = Docs.Create.TextDocument('', { _width: 400, _height: 200, title: 'My Outline', _layout_autoHeight: true }); - const proto = newBox.proto!; + const proto = DocCast(newBox.proto); const prompt = 'Press alt + r to start dictating here...'; const head = 3; const anchor = head + prompt.length; @@ -372,7 +372,7 @@ export namespace DictationManager { expression: /view as (freeform|stacking|masonry|schema|tree)/g, action: (target: DocumentView, matches: RegExpExecArray) => { const mode = matches[1]; - mode && (target.props.Document._viewType = mode); + mode && (target.props.Document._type_collection = mode); }, restrictTo: [DocumentType.COL], } |
