aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DictationManager.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-21 18:58:21 -0400
committerbobzel <zzzman@gmail.com>2025-03-21 18:58:21 -0400
commit7e4d793eaa7e5b6b564355a11fa02a5611645f20 (patch)
treeacab0bf2057a26b4daeead8ce8d4568afa167b2a /src/client/util/DictationManager.ts
parent2d64242ce924a5ba18e3c8dd0a6efe54db2e3f9a (diff)
trying to improve how data / layout / root and templtae docs are accessed.
Diffstat (limited to 'src/client/util/DictationManager.ts')
-rw-r--r--src/client/util/DictationManager.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts
index 897366757..44fbda319 100644
--- a/src/client/util/DictationManager.ts
+++ b/src/client/util/DictationManager.ts
@@ -2,7 +2,6 @@
import * as interpreter from 'words-to-numbers';
import { ClientUtils } from '../../ClientUtils';
import { Doc, Opt } from '../../fields/Doc';
-import { DocData } from '../../fields/DocSymbols';
import { List } from '../../fields/List';
import { RichTextField } from '../../fields/RichTextField';
import { listSpec } from '../../fields/Schema';
@@ -339,13 +338,12 @@ export namespace DictationManager {
{
action: (target: DocumentView) => {
const newBox = Docs.Create.TextDocument('', { _width: 400, _height: 200, title: 'My Outline', _layout_autoHeight: true });
- const proto = newBox[DocData];
const prompt = 'Press alt + r to start dictating here...';
const head = 3;
const anchor = head + prompt.length;
const proseMirrorState = `{"doc":{"type":"doc","content":[{"type":"ordered_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"${prompt}"}]}]}]}]},"selection":{"type":"text","anchor":${anchor},"head":${head}}}`;
- proto.data = new RichTextField(proseMirrorState, prompt);
- proto.backgroundColor = '#eeffff';
+ newBox.$data = new RichTextField(proseMirrorState, prompt);
+ newBox.$backgroundColor = '#eeffff';
target.props.addDocTab(newBox, OpenWhere.addRight);
},
},