diff options
author | bobzel <zzzman@gmail.com> | 2025-03-18 22:18:35 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-03-18 22:18:35 -0400 |
commit | 251bc8c4a36019d719fad9d4bb6548ab04b340fb (patch) | |
tree | 6090035d80dfaed85f705c937650cc073b2f472e /src | |
parent | d774333f15f9df2adf598328993e69fb76a74b50 (diff) |
updated iink to latest version
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/InkTranscription.tsx | 23 |
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)); |