ReadOnly mode

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Konstantin
Posts: 61

ReadOnly mode

Thu Aug 18, 2016 2:19 pm

In Webapp I use different ways to switch ReadOnly mode:

Code: Select all

AuthorDocumentModel documentModel;
documentModel.getWSEditor().setEditable(!isReadOnly);   
documentModel.getWSEditor().getCurrentPage().setEditable(!isReadOnly);   
documentModel.getWSEditor().getCurrentPage().getParentEditor().setEditable(isReadOnly);
documentModel.getAuthorAccess().getEditorAccess().setEditable(!isReadOnly);

also I tried:

Code: Select all

editor.getActionsManager().invokeOperation(
          'SetReadOnlyStatusOperation',
          {'read-only': true}
        );

In Author mode it works but in Text mode it dosn't works.
In ReadOnly I can change text in Text mode and return to Author mode.

Do you have API to make Text mode as ReadOnly ?
Gabriel Titerlea
Posts: 38

Re: ReadOnly mode

Thu Aug 18, 2016 3:41 pm

Hello,

This method is the API:

Code: Select all

editor.getActionsManager().invokeOperation(
          'SetReadOnlyStatusOperation',
          {'read-only': true}
);

It will work in text mode as well in the next release (18.1)

Regards,
Gabriel
Konstantin
Posts: 61

Re: ReadOnly mode

Mon Aug 22, 2016 5:56 pm

Ok Thanks

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests