General questions

Answered

add image in editor

how can i add image on my editor view?


Best Answer

Hi,


Please refer to the API doc of the Editor addImage function. For Android it is available here.


inputFile - the image file to add.
mimeType - the mime type that specifies the format of `inputFile`.


Best regards,


Gwenaëlle


Dear Ganesh,


do you want to add an image in a Text Document, or on your canvas?


If in a Text Document, you can use the addImage function:

-https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/Editor.html#addImage-float-float-java.io.File-com.myscript.iink.MimeType-

-https://developer.myscript.com/docs/interactive-ink/1.3/android/fundamentals/editing/#block-addition


If in your canvas, this has to be done by yourself.


Best regards,


Olivier

In the Add image function the file is in format of string..then how image is to be added and which mimetype should be selected??

 editorViewController.editor.addImage(<#T##position: CGPoint##CGPoint#>, file: <#T##String#>, mimeType: <#T##IINKMimeType#>)

Dear Ganesh,


The mime type depends on the image type of the image you want to add in your Text Document.


Supported mime Types are listed in the API documentation:

https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/MimeType.html


Best regards,


Gwenaëlle

I want to import the image from gallery then what should written in function file string??

hii...i want to upload image from gallery

then what should pass as  string in the function and what should be the mimetype

Answer

Hi,


Please refer to the API doc of the Editor addImage function. For Android it is available here.


inputFile - the image file to add.
mimeType - the mime type that specifies the format of `inputFile`.


Best regards,


Gwenaëlle


1 person likes this