Smart Paste, how to add a choice ?

Oxygen general issues.
Vincent
Posts: 52
Joined: Thu Dec 15, 2011 7:56 pm

Smart Paste, how to add a choice ?

Post by Vincent »

Hi,

When smart copy/paste is enabled.
Is it possible to add a new choice in this alert :

Image


In fact, I would like to add :

"Inside a new MangerSortirAchats element, after the current MangerSortirAchats element."
(I just want to create a new following node and paste the content of my copy)


And something else,
When french language is selected, everything is translated except the choices. For exemple : "After Splitting the MangerSortirAchts element" stays in english.
Is there any way for me to translate it for my users ?



I suppose it's possible with the SDK. But I begin my part of investigation in it, so if you can help me by indicating where are the files to modify ! :)

Thank you,
Vincent *Reading the doc*
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Smart Paste, how to add a choice ?

Post by Radu »

Hi Vincent,

The list of strategies which are proposed to you by Oxygen when the current context is invalid for insertion/paste is fixed and cannot be changed via the API.

How exactly are you inserting the invalid content? DnD, paste, or calling API from a custom action?

But if you create an implementation of ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter

in your ExtensionsBundle implementation:

ro.sync.ecss.extensions.dita.DITAExtensionsBundle.getAuthorSchemaAwareEditingHandler()

you will receive callbacks like:
ro.sync.ecss.extensions.dita.DITASchemaAwareEditingHandler.handlePasteFragment(int, AuthorDocumentFragment[], int, AuthorAccess)

On such callbacks you can decide for your particular case to be handled by default in your custom way without showing the strategies chooser.

The AuthorSDK should have the Java sources for ro.sync.ecss.extensions.dita.DITASchemaAwareEditingHandler which should be a good example for you.


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Vincent
Posts: 52
Joined: Thu Dec 15, 2011 7:56 pm

Re: Smart Paste, how to add a choice ?

Post by Vincent »

Thank you Radu,
I start working on it and I'll be back with my next questions !

Vincent.
Post Reply