diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-08-20 21:55:46 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-08-20 21:55:46 -0400 |
commit | 9984f2f19001c07e63738947172e12da25e4498e (patch) | |
tree | b35f83d7cbcde569c03686dd3723b02e205c4265 /src | |
parent | 6977fa5b825b4779c9fff0301280706944e88eaa (diff) |
bulleted list
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/DictationManager.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts index b00846756..488a146bf 100644 --- a/src/client/util/DictationManager.ts +++ b/src/client/util/DictationManager.ts @@ -13,6 +13,7 @@ import { AudioField, ImageField } from "../../new_fields/URLField"; import { HistogramField } from "../northstar/dash-fields/HistogramField"; import { MainView } from "../views/MainView"; import { Utils } from "../../Utils"; +import { RichTextField } from "../../new_fields/RichTextField"; /** * This namespace provides a singleton instance of a manager that @@ -300,11 +301,15 @@ export namespace DictationManager { } }], - ["promote", { + ["create bulleted note", { action: (target: DocumentView) => { - console.log(target); - }, - restrictTo: [DocumentType.TEXT] + let newBox = Docs.Create.TextDocument({ width: 400, height: 200, title: "My Outline" }); + let proto = newBox.proto!; + let proseMirrorState = '"{"doc":{"type":"doc","content":[{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"type":"text","text":""}]}]}]}]},"selection":{"type":"text","anchor":1,"head":1}}"'; + proto.data = new RichTextField(proseMirrorState); + proto.backgroundColor = "#eeffff"; + target.props.addDocTab(newBox, proto, "onRight"); + } }] ]); |