aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/InkTranscription.tsx23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index e800e0ae3..29cbe8e2d 100644
--- a/src/client/views/InkTranscription.tsx
+++ b/src/client/views/InkTranscription.tsx
@@ -48,7 +48,7 @@ export class InkTranscription extends React.Component {
const options = {
configuration: {
server: {
- scheme: 'https',
+ scheme: 'https' as iink.TScheme,
host: 'cloud.myscript.com',
applicationKey: 'c0901093-5ac5-4454-8e64-0def0f13f2ca',
hmacKey: 'f6465cca-1856-4492-a6a4-e2395841be2f',
@@ -56,13 +56,14 @@ export class InkTranscription extends React.Component {
},
recognition: {
type: 'TEXT',
+ lang: 'en_US',
+ text: {
+ mimeTypes: ['text/plain'] as 'text/plain'[],
+ },
},
},
};
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const editor = new iink.Editor(r, options as any);
-
- await editor.initialize();
+ await iink.Editor.load(r, 'INKV2', options);
this._textRegister = r;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -78,7 +79,7 @@ export class InkTranscription extends React.Component {
const options = {
configuration: {
server: {
- scheme: 'https',
+ scheme: 'https' as iink.TScheme,
host: 'cloud.myscript.com',
applicationKey: 'c0901093-5ac5-4454-8e64-0def0f13f2ca',
hmacKey: 'f6465cca-1856-4492-a6a4-e2395841be2f',
@@ -86,14 +87,14 @@ export class InkTranscription extends React.Component {
},
recognition: {
type: 'TEXT',
+ lang: 'en_US',
+ text: {
+ mimeTypes: ['text/plain'] as 'text/plain'[],
+ },
},
},
};
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const editor = new iink.Editor(r, options as any);
-
- await editor.initialize();
- this.iinkEditor = editor;
+ this.iinkEditor = await iink.Editor.load(r, 'INKV2', options);
this._textRegister = r;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
r?.addEventListener('exported', (e: any) => this.exportInk(e, this._textRef));