General questions

An exception could not be solved

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.

1 Comment

Dear 龚 文益,

thank you for contacting us.

Currently, before calling the Convert function, we recommend you call the "getSupportedTargetConversionStates" function (

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,