diff options
author | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
commit | 376270791c7fe414c05a87f73afe11146d119c35 (patch) | |
tree | c6c788c958a5aaca4a9bbdd709d5e6f1d76dde0d /src/client/util/DictationManager.ts | |
parent | 2bc89733ce522527c2f27203b537d99395c9479b (diff) | |
parent | bf16eca7a84adfdf1c5970e7e4793568ee70325d (diff) |
Merge branch 'master' into advanced-trails
Diffstat (limited to 'src/client/util/DictationManager.ts')
-rw-r--r-- | src/client/util/DictationManager.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts index e116ae14b..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'; @@ -327,8 +327,8 @@ export namespace DictationManager { 'new outline', { action: (target: DocumentView) => { - const newBox = Docs.Create.TextDocument('', { _width: 400, _height: 200, title: 'My Outline', _autoHeight: true }); - const proto = newBox.proto!; + const newBox = Docs.Create.TextDocument('', { _width: 400, _height: 200, title: 'My Outline', _layout_autoHeight: true }); + 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], } |