How to disable xml Document in Author

Post here questions and problems related to oXygen frameworks/document types.
sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

How to disable xml Document in Author

Post by sebastienlavandier » Fri Jul 13, 2012 11:00 am

Hello,

I want to know if it's possible to disable an Xml Document when it opening, maybe by using a framework ? which method can I use ?

In a second step, if user do a right click on the Xml document, I want to proposed him to enable this document.

Do you think that is possible ?

Thanks in advance you for your answer.
Best regards.
Seb.L

Radu
Posts: 6453
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to disable xml Document in Author

Post by Radu » Fri Jul 13, 2012 11:39 am

Hi Sebastien,

What do you mean by "disable"? Do you mean not-editable?

We have some API like:

Code: Select all

ro.sync.exml.workspace.api.editor.page.WSTextBasedEditorPage.setEditable(boolean)
which might be useful to you.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: How to disable xml Document in Author

Post by sebastienlavandier » Mon Jul 16, 2012 10:56 am

Hello Radu,
Thank you very much for your help.
Bye

sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: How to disable xml Document in Author

Post by sebastienlavandier » Wed Apr 17, 2013 11:41 am

Hi Radu,

Now, with the new 14.2 version I want to know how it's possible to disable xml document in text mode ?

Thanks in advance for your help.
Sébastien

adrian
Posts: 2548
Joined: Tue May 17, 2005 4:01 pm

Re: How to disable xml Document in Author

Post by adrian » Wed Apr 17, 2013 11:51 am

Hi,

Can you please clarify what you understand by "disable xml document"?
Do you want to hide the Text mode and make it inaccessible to the user?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: How to disable xml Document in Author

Post by sebastienlavandier » Wed Apr 17, 2013 12:02 pm

No, I just want that a user can't modify the document in text mode, like it's possible in author mode.

adrian
Posts: 2548
Joined: Tue May 17, 2005 4:01 pm

Re: How to disable xml Document in Author

Post by adrian » Wed Apr 17, 2013 12:10 pm

There is no user option that does this. But, you can use the API that Radu mentioned:
ro.sync.exml.workspace.api.editor.page.WSTextBasedEditorPage.setEditable(boolean)

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: How to disable xml Document in Author

Post by sebastienlavandier » Wed Apr 17, 2013 12:13 pm

Thanks you for your help.
Sébastien

Post Reply