Search found 9 matches

by AndreasM
Fri Apr 12, 2019 12:55 pm
Forum: SDK-API, Frameworks - Document Types
Topic: issue(possible bug) with XML templates and custom ID editor variable
Replies: 4
Views: 363

Re: issue(possible bug) with XML templates and custom ID editor variable

Thank you!. Using the "setGlobalObjectProperty" function works. (Can't rely on the potential users installing the maintenance update :/ ) I have a related follow-up question though(if this is not the right place, I could start a new thread): This method now creates an "untitled.xml" with my customID...
by AndreasM
Fri Mar 22, 2019 11:13 am
Forum: SDK-API, Frameworks - Document Types
Topic: issue(possible bug) with XML templates and custom ID editor variable
Replies: 4
Views: 363

issue(possible bug) with XML templates and custom ID editor variable

Hello, we are using a framework template and a plugin (based on https://github.com/oxygenxml/wsaccess-javascript-sample-plugins/tree/master/customEditorVariables) to inject a custom server provided ID into the xml:id attribute of the root element when a new document is created. This works perfectly ...
by AndreasM
Fri Jan 18, 2019 4:11 pm
Forum: SDK-API, Frameworks - Document Types
Topic: Set filename and save folder via plugin or framework
Replies: 7
Views: 1083

Re: Set filename and save folder via plugin or framework

Hi Radu That's a good hint. Thanks. Even with that, my code returned "TypeError: Cannot find function saveAs in object 0." in the above configuration. Today I rewrote the preSaveListener and made some progress I think... preSaveListener = { /* Called when a document is about to be Saved */ editorAbo...
by AndreasM
Thu Jan 17, 2019 5:27 pm
Forum: SDK-API, Frameworks - Document Types
Topic: Set filename and save folder via plugin or framework
Replies: 7
Views: 1083

Re: Set filename and save folder via plugin or framework

This is the entire wsAccess.js right now. When I return "true" in the preSaveListener, both event listeners work as expected showing my debug messages just before/after the save. function applicationStarted(pluginWorkspaceAccess) { Packages.java.lang.System.err.println("Application started " + plugi...
by AndreasM
Thu Jan 17, 2019 4:55 pm
Forum: SDK-API, Frameworks - Document Types
Topic: Set filename and save folder via plugin or framework
Replies: 7
Views: 1083

Re: Set filename and save folder via plugin or framework

Hi Radu thanks, yes that was the direction in which I was thinking. I forgot to mention that I'm using the a JS plugin to achieve this. Here's a snippet of my current code, the message "in save event" is displayed as expected but I get the error "Cannot find function saveAs in object 0" editor = plu...
by AndreasM
Fri Jan 11, 2019 5:09 pm
Forum: SDK-API, Frameworks - Document Types
Topic: Set filename and save folder via plugin or framework
Replies: 7
Views: 1083

Set filename and save folder via plugin or framework

Hello again, is there a way, when saving a file, to auto generate the filename (based on an ID value within the document) and set the save location to a predetermined folder on server filesystem. I figured out how to inject code using the saveListener but have not found ways to manipulate the filena...
by AndreasM
Thu Nov 29, 2018 7:58 pm
Forum: SDK-API, Frameworks - Document Types
Topic: ID assignment and indexing via Plugin or Authormode Action
Replies: 4
Views: 980

Re: ID assignment and indexing via Plugin or Authormode Action

Thanks for the answer.
Got a working plugin now that gets the correct ID from our server when a new file is created :)
by AndreasM
Thu Nov 15, 2018 2:53 pm
Forum: SDK-API, Frameworks - Document Types
Topic: ID assignment and indexing via Plugin or Authormode Action
Replies: 4
Views: 980

Re: ID assignment and indexing via Plugin or Authormode Action

First of all, thanks for the answer!
I've been looking into the custom editor variables JS plugin.
Is there a way to make http requests from within the plugin (to get the ID from a server file) ?
by AndreasM
Mon Nov 05, 2018 6:16 pm
Forum: SDK-API, Frameworks - Document Types
Topic: ID assignment and indexing via Plugin or Authormode Action
Replies: 4
Views: 980

ID assignment and indexing via Plugin or Authormode Action

Hello we are currently developing a custom author-mode framework for a project that includes large amounts of "TEI-esque" XML Datasets (e.g. for persons or places). I have come pretty far working with the built-in functions and existing plugins but have reached a point at which I might need to dive ...