Start a new topic
iink SDK on Device
Im hoping to be able to add images and potentially documents to the background and as interactable/ movable objects.
Thanks in advance.
Dear Ethan,
it is currently possible to add images as objects using the addImage function.
Let us know if this helps!
Best regards,
Olivier
Dear Gonzalo,
Normally, the "file" parameter should be the path of the image file. The image can be in GIF, JPEG or PNG.
You should also ensure you provide with the corresponding MIMETYPE.
Hi Olivier,
I'm having issues with it too. I'm getting this error: cannot add a new block into this block
I'm attempting to add it in aTtext Document where I've successfully been able to add other content blocks. My swift code is below.
editorViewController?.editor?.addImage(p, file: Bundle.main.resourcePath! + "/blueGradient.png", mimeType: IINKMimeType.PNG)}
Any Ideas? Thanks.
Thank you for the update, I am glad it is working!
this error is likely to occur for 2 reasons:
-Either a block that is not a Container Block already exists where you try to add the image
-Or the empty space around the position is too small
Applying the proper transform, as shown in the other topic is likely to help. Let me know if if is not the case.
Ethan Chan
Im hoping to be able to add images and potentially documents to the background and as interactable/ movable objects.
Thanks in advance.
Dear Ethan,
it is currently possible to add images as objects using the addImage function.
Let us know if this helps!
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear Ethan,
it is currently possible to add images as objects using the addImage function.
Let us know if this helps!
Best regards,
Olivier
Olivier @MyScript
Dear Gonzalo,
Normally, the "file" parameter should be the path of the image file. The image can be in GIF, JPEG or PNG.
You should also ensure you provide with the corresponding MIMETYPE.
Best regards,
Olivier
Ethan Chan
Hi Olivier,
I'm having issues with it too. I'm getting this error: cannot add a new block into this block
I'm attempting to add it in aTtext Document where I've successfully been able to add other content blocks. My swift code is below.
editorViewController?.editor?.addImage(p, file: Bundle.main.resourcePath! + "/blueGradient.png", mimeType: IINKMimeType.PNG)}
Any Ideas? Thanks.
Olivier @MyScript
Dear Gonzalo,
Thank you for the update, I am glad it is working!
Best regards,
Olivier
Olivier @MyScript
Dear Gonzalo,
this error is likely to occur for 2 reasons:
-Either a block that is not a Container Block already exists where you try to add the image
-Or the empty space around the position is too small
Applying the proper transform, as shown in the other topic is likely to help. Let me know if if is not the case.
Best regards,
Olivier