Reading data from oxygen sdk on the js page

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
karthickmv
Posts: 5
Joined: Mon Oct 16, 2023 4:53 pm

Reading data from oxygen sdk on the js page

Post by karthickmv »

Hi,

I am trying to read the data from the oxygen sdk returned by the AuthorOperationWithResult and this is the code that i have included in the oxygen framework's JS

Code: Select all

editorGlobal.getActionsManager().invokeOperation(
              'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation', 
              {fragment: data}, 
              function(e) {
                console.log('Done!', e);
            });
in the console the output is "Done! null". I have verified that the operation is called but still i receive a null response. Any help on this would be great.

Thanks,
Karthick
Bogdan Dumitru
Site Admin
Posts: 142
Joined: Tue Mar 20, 2018 5:28 pm

Re: Reading data from oxygen sdk on the js page

Post by Bogdan Dumitru »

Hello,

The callback function has two arguments, the first argument is the error object or null and the second one is the actual result. You are actually logging the error, which is null.
Bogdan Dumitru
http://www.oxygenxml.com
Post Reply