aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DictationManager.ts
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-06-23 13:50:41 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-06-23 13:50:41 +0800
commitc4a448445471b64dd13990245f16bc10625b28c0 (patch)
tree5c0ee18402b1ea35f0eab9de11b5abf7fc8dc434 /src/client/util/DictationManager.ts
parent790d41009a678f560cd3b78e86069251e494cfd1 (diff)
parent10382b7fcac2d92dc845e9b271e38de3d8c09feb (diff)
Merge branch 'master' into mobile_revision_direct
Diffstat (limited to 'src/client/util/DictationManager.ts')
-rw-r--r--src/client/util/DictationManager.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts
index e46225b4a..28b1ca6cf 100644
--- a/src/client/util/DictationManager.ts
+++ b/src/client/util/DictationManager.ts
@@ -144,7 +144,7 @@ export namespace DictationManager {
recognizer.start();
return new Promise<string>((resolve, reject) => {
- recognizer.onerror = (e: SpeechRecognitionError) => {
+ recognizer.onerror = (e: any) => { // e is SpeechRecognitionError but where is that defined?
if (!(indefinite && e.error === "no-speech")) {
recognizer.stop();
reject(e);
@@ -335,7 +335,7 @@ export namespace DictationManager {
const prompt = "Press alt + r to start dictating here...";
const head = 3;
const anchor = head + prompt.length;
- const proseMirrorState = `{"doc":{"type":"doc","content":[{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":"${prompt}"}]}]}]}]},"selection":{"type":"text","anchor":${anchor},"head":${head}}}`;
+ 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);
proto.backgroundColor = "#eeffff";
target.props.addDocTab(newBox, "onRight");