Page 1 of 1

Where are "Insert Table" defaults stored?

Posted: Sat Apr 25, 2020 5:59 pm
by chrispitude
I see that Oxygen remembers the following settings in the "Insert Table" dialog:
image.png
image.png (11.67 KiB) Viewed 1034 times
But where does Oxygen store these settings?

The settings shown above are the defaults from a fresh Oxygen installation. But this causes us problems because we want new tables to be created with "<unset>" properties by default so the default CSS is used, and writers set these only when an override is wanted. Because of these settings, every table is created with explicit overrides of the default CSS which is causing problems.

Thanks!

Re: Where are "Insert Table" defaults stored?

Posted: Mon Apr 27, 2020 8:11 am
by Radu
Hi Chris,

Those settings are stored in the global Oxygen settings. For example if you set those settings to certain values, restart Oxygen and then export its global settings to an XML file (main menu Options->Export Global Options), you will find in the XML export an entry like this:

Code: Select all

 <entry>
             <String>DITA.document.type.TABLE_CUSTOMIZER_OPTIONS</String>
             <String>rO0ABXNyADpyby5zeW5jLmVjc3MuZXh0ZW5zaW9ucy5jb21tb25zLnRhYmxlLm9wZXJhdGlvbnMuVGFibGVJbmZvAAAAACTFwUoCAAtJAA1jb2x1bW5zTnVtYmVyWgAOZ2VuZXJhdGVGb290ZXJaAA5nZW5lcmF0ZUhlYWRlckkACnJvd3NOdW1iZXJJAAp0YWJsZU1vZGVsTAAFYWxpZ250ABJMamF2YS9sYW5nL1N0cmluZztMAAZjb2xzZXBxAH4AAUwAEWNvbHVtbnNXaWR0aHNUeXBldABcTHJvL3N5bmMvZWNzcy9leHRlbnNpb25zL2NvbW1vbnMvdGFibGUvb3BlcmF0aW9ucy9UYWJsZUN1c3RvbWl6ZXJDb25zdGFudHMkQ29sdW1uV2lkdGhzVHlwZTtMAAVmcmFtZXEAfgABTAAGcm93c2VwcQB+AAFMAAV0aXRsZXEAfgABeHAAAAACAAEAAAADAAAAAXBwfnIAWnJvLnN5bmMuZWNzcy5leHRlbnNpb25zLmNvbW1vbnMudGFibGUub3BlcmF0aW9ucy5UYWJsZUN1c3RvbWl6ZXJDb25zdGFudHMkQ29sdW1uV2lkdGhzVHlwZQAAAAAAAAAAEgAAeHIADmphdmEubGFuZy5FbnVtAAAAAAAAAAASAAB4cHQAEkRZTkFNSUNfQ09MX1dJRFRIU3QAA2FsbHB0AAZkc2FkYXM=</String>
       </entry>
Unfortunately the value of the key is a serialized object so it's hard to see what it's composed of. But it should be portable nonetheless.
So if you have for example an Oxygen plugin which imposes a set of fixed settings from an XML options file when Oxygen starts, like this sample one:

https://github.com/oxygenxml/wsaccess-j ... se-options

you would need to copy this extra <entry> in your plugin's options.xml.

Regards,
Radu

Re: Where are "Insert Table" defaults stored?

Posted: Mon Apr 27, 2020 4:01 pm
by chrispitude
Hi Radu,

This plugin approach sounds promising! Where can I find instructions on how to use it? I don't know enough to guess just from the file names and types.

Re: Where are "Insert Table" defaults stored?

Posted: Tue Apr 28, 2020 9:53 am
by Radu
Hi Chris,

So you have this "impose-options" folder containing the plugin.xml, the Javascript and the options.xml.
One way to install it is to copy the "impose-options" folder to the "OXYGEN_INSTALL_DIR/plugins" folder and then restart Oxygen. This is what we call the manual plugin installation. You can verify this works after the restart if you go to the Oxygen Preferences->Plugins page and see what plugins are installed.
The other more elegant way to distribute a plugin is to zip the folder and distribute it as an add-on from an internal web server:

https://blog.oxygenxml.com/topics/packing-add-ons.html

Regards,
Radu