Insert date from date picker as tagged elements

Are you missing a feature? Request its implementation here.
mboudreau
Posts: 71
Joined: Sat Jan 07, 2017 1:23 am

Insert date from date picker as tagged elements

Post by mboudreau »

Is it possible (if not, this is a feature request) to prompt a user to select a date in a calendar-style date picker and then insert that value as a tagged XML fragment?

I'm working on a little tool to add JATS markup to an article that has been retracted. Using InsertFragmentOperation, I'm currently inserting this:

Code: Select all

<pub-history>
  <event event-type="${ask('Event type:', combobox, ('retraction':'Retraction';'removal':'Removal'; 'expression_of_concern':'Expression of concern'), 'retraction')}">
    <date>
      <day>${ask('Day:', generic)}</day>
      <month>${ask('Month:', generic)}</month>
      <year>${ask('Year:', generic)}</year>
    </date>
  </event>
</pub-history>
But I'd prefer to present the user with a date picker and have that converted to the necessary markup. Is this already possible, in a way I just haven't found yet?
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Insert date from date picker as tagged elements

Post by Radu »

Hi,
I'm afraid we do not have such a feature for the $ask editor variable. Also the $ask editor variable would return a single output but you seem to want to split that output in three different fields so not sure how that would play with our current implementation of these editor variables.
For working in the Author visual editor besides the InsertFragmentOperation there is also a JSOperation which would allow one to use Javascript in order to create more complex workflows.
There are some samples here, for example a JSOperation which shows a dialog to the end user and then inserts XML content in the document:
https://github.com/oxygenxml/javascript ... XMLFrag.js
That particular dialog would need to be implemented in Java Swing.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply