General questions

Answered

Text listener for handwriting

is there any listener where I can get the text being entered so that I can update my view accordingly based on the changes made and how can I get math equation as bitmap something similar to math widget.getresultasbitmap and ontextchange as I have migrated from the singlelinewidget and mathwidget apis to editor type with multiple,thanks.


Best Answer

Dear Yahya Basique,


Thank you for your question.


There is no text listener, but you might use the IEditorListener to monitor content changes on your editor thanks to the contentChanged method.


If you want to export math content as an image you can make an export of your math block. You should use and ImageDrawer for this export, so if we assume your editor contains a single math part, the code could be :


            ImageDrawer imageDrawer = new ImageDrawer();
            editor.export_(editor.getRootBlock(), file.getPath(), MimeType.JPEG, imageDrawer);




Best regards,


Gwenaëlle

1 Comment

Answer

Dear Yahya Basique,


Thank you for your question.


There is no text listener, but you might use the IEditorListener to monitor content changes on your editor thanks to the contentChanged method.


If you want to export math content as an image you can make an export of your math block. You should use and ImageDrawer for this export, so if we assume your editor contains a single math part, the code could be :


            ImageDrawer imageDrawer = new ImageDrawer();
            editor.export_(editor.getRootBlock(), file.getPath(), MimeType.JPEG, imageDrawer);




Best regards,


Gwenaëlle