Software Development Kit

Answered

Angular/ Typescript

Hi Guys,

How can i get the written Input of the Editor into a variable in Typescript and maybe compare it to a given variable?

kind regards

KK


Best Answer

Dear Konstantin,


Thank you for the update.


You should indeed set the proper italian language, the default one being the en_US.


This can be done setting the "lang" key to "it_IT": https://developer.myscript.com/docs/interactive-ink/1.3/web/reference/configuration-myscriptjs/#interactive-ink-api-v4-parameters


Best regards,


Olivier


Dear Konstantin,


thank you for your question.


If I understand well, you would like to get the converted result of the editor?


In that case, you shall call the "export" function of the editor: https://developer.myscript.com/refguides/interactive-ink/android/1.2/com/myscript/iink/Editor.html#export_-com.myscript.iink.ContentBlock-com.myscript.iink.MimeType-


If your input is text, you can set the "TEXT" or "JIIX" Mimetype. Before export, you should ensure you call the waitForIdle function to ensure conversion is finished.


Best regards,


Olivier



1 person likes this

Actually i just had to create a custom event 'exported' and then i accessed the text with detail.exports and [text/plain]. I found that in the JS code of one of your web demos.

But i have another question: Does the language matter in wich i write? For example i tried to write the italian word 'andare' and the english words 'and' + 'are' were recognized.

Answer

Dear Konstantin,


Thank you for the update.


You should indeed set the proper italian language, the default one being the en_US.


This can be done setting the "lang" key to "it_IT": https://developer.myscript.com/docs/interactive-ink/1.3/web/reference/configuration-myscriptjs/#interactive-ink-api-v4-parameters


Best regards,


Olivier

Dear Olivier,

Now it works correctly.

Thanks a lot :)

Best regards,

Konstantin

Login or Signup to post a comment