Dear 龚 文益,
thank you for contacting us.
Currently, before calling the Convert function, we recommend you call the "getSupportedTargetConversionStates" function (https://developer.myscript.com/refguides/interactive-ink/android/1.2/com/myscript/iink/Editor.html#getSupportedTargetConversionStates-com.myscript.iink.ContentBlock-)
This way, you will be able to know the conversion states that can be provided to the Convert function.
In your case, before calling the Convert function, with DIGITAL_EDIT conversion state, in a first time you should call the it with the DIGITAL_PUBLISH state then the DIGITAL_EDIT.
It should then work properly this way.
Best regards,
Olivier
龚 文益
I want to convert the text document and call it.
ContentBlock rootBlock = editor.getRootBlock();
Editor.convert(rootBlock, ConversionState.DIGITAL_EDIT);
But the following exception occurred
Caused by: java.lang.IllegalArgumentException: target state unreachable from current state of Text document block
How can I solve it? Thank you.