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
G
Gwenaelle @MyScript
said
almost 3 years ago
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
G
Gwenaelle @MyScript
said
almost 3 years ago
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);
yahya basique
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.
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 :
Best regards,
Gwenaëlle
Gwenaelle @MyScript
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 :
Best regards,
Gwenaëlle