set edit mode to text for all files in a project

Having trouble installing Oxygen? Got a bug to report? Post it all here.
catterall
Posts: 63
Joined: Sat Jan 24, 2004 12:10 am
Location: Oaxaca, Mexico
Contact:

set edit mode to text for all files in a project

Post by catterall »

I've probably missed this in preferences, but I just want to set all files in a project to open in text mode (i.e. not grid or author). After upgrading to v.235 all files open in author mode. Query options in the xpr file possibly/query.
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: set edit mode to text for all files in a project

Post by Radu »

Hi,

There is an Oxygen Preferences->"Editor / Edit Modes" page, what default edit mode does it define for "XML Editor"? It should be "Text". You can use the "Restore Defaults" button in this preferences page to restore it to the default behavior.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
catterall
Posts: 63
Joined: Sat Jan 24, 2004 12:10 am
Location: Oaxaca, Mexico
Contact:

Re: set edit mode to text for all files in a project

Post by catterall »

I have always had Editor/Edit modes is set to text for XML files, but I still have files that open in Author mode. If i reset one of these to Text mode, close it and reopen it, then it retains the text mode attribute. It seems that a file can retain its previous open mode which overrides the global definition. Is this the expected behavior?
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: set edit mode to text for all files in a project

Post by Radu »

Hi,

Yes, once a file is opened in a certain editing mode, it will retain this information from the next time when it's opened.
So let's try this with a file which you have not opened, maybe create a new file and open it.
What type of XML files are they? Are they DITA XML? DocBook XML? Or something else?
Or if you defined a custom framework configuration in the Preferences->"Document Type Association" page you have the possibility to specify the initial edit mode, did you specify "Author" there?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
catterall
Posts: 63
Joined: Sat Jan 24, 2004 12:10 am
Location: Oaxaca, Mexico
Contact:

Re: set edit mode to text for all files in a project

Post by catterall »

Hi Radu
file>new>popular>DocBook>DocBook5.1>article
save as ~/git/Untitled.xml
the file opens in author mode although I have text mode in editor prefs. WHY?
close the file (not save or save as)
open it again
it opens in text mode
change it to author mode
close it
open again
it opens in author mode
chnage to text mode
close it
open again
it opens in text mode
All this seems very reasonable.
I have never used author mode at all since it appeared (I started on version 2)
I have no idea how any of my files got into author mode. But its probably my fault.
No real problem now I know.
BUT: how about an option in a project xpr to choose between text/author/grid for all files in the project ?
Thanks for clarifying things for me
Regards
Ron
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: set edit mode to text for all files in a project

Post by Radu »

Hi Ron,

About this remark:
file>new>popular>DocBook>DocBook5.1>article
save as ~/git/Untitled.xml
the file opens in author mode although I have text mode in editor prefs. WHY?
Just to describe a bit better how things work, in the Oxygen "Preferences->"Editor / Edit Modes" page there is a checkbox named "Allow document specific edit mode...." which is checked by default.
If the checkbox is unchecked, the table below the setting will be always used to determine the initial edit mode for newly opened files.
But the checkbox is checked by default, meaning that the framework specific configurations from the Preferences=>"Document Type Association" takes precedence. For example the "DocBook 5" framework configuration enforces the use of the "Author" visual editing mode for newly opened Docbook 5 XML documents.
So in my opinion if you uncheck the "Allow document specific edit mode...."" setting in the Oxygen "Preferences->"Editor / Edit Modes" page you should achieve what you want. And you can store the entire "Editor / Edit Modes" preferences page at project level using the "Global options/Project options" radio button at the bottom of the page.


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
catterall
Posts: 63
Joined: Sat Jan 24, 2004 12:10 am
Location: Oaxaca, Mexico
Contact:

Re: set edit mode to text for all files in a project

Post by catterall »

Hi Radu
Many thanks, that explains everything.
I hadn't realised that " the "DocBook 5" framework configuration enforces the use of the "Author" visual editing mode for newly opened Docbook 5 XML documents"
jpond
Posts: 16
Joined: Fri Apr 06, 2012 9:10 pm

Re: set edit mode to text for all files in a project

Post by jpond »

Thanks Radu, this just helped me also!!
Post Reply