Page 1 of 1

Clarification in Imagemap

Posted: Wed Dec 14, 2016 3:53 pm
by Raga Mounika
Hi Team,

I need some clarifications when an imagemap is inserted.
1) When an <imagemap> is inserted and <keyref> is used for image is it possible to have imagemap editor?
Currently imagemap editor is shown only for href in image.
2) In Imagemap editor in linking part is it possible to change the menu options.I need to add 1 more option to support my requirement.

Regards,
Mounika.

Re: Clarification in Imagemap

Posted: Thu Dec 15, 2016 12:12 pm
by Raga Mounika
Hi Team,

For your information I am using oXygen Author 18 with Eclipse plugin.

Regards,
Mounika

Re: Clarification in Imagemap

Posted: Thu Dec 15, 2016 4:42 pm
by alex_jitianu
Hi Mounika,
1) When an <imagemap> is inserted and <keyref> is used for image is it possible to have imagemap editor?
Currently imagemap editor is shown only for href in image.
This is an issue on our part. We will fix it for the next version of Oxygen. If it is time we will try to push a fix into a maintenence build for 18.1 too. If needed, I think you can implement an workaround though a custom Edit Map action. Please let me know if you are interested in this approach so I can give you more details.
In Imagemap editor in linking part is it possible to change the menu options.I need to add 1 more option to support my requirement.
Are you refering to the menu associated with the Target field? The one that presents: Cross Reference, FileReference and WebLink as possible values? Unfortunately we don't have an extension point for contributing additional actions. What action would you like to contribute?

Best regards,
Alex

Re: Clarification in Imagemap

Posted: Fri Dec 16, 2016 9:15 am
by Raga Mounika
This is an issue on our part. We will fix it for the next version of Oxygen. If it is time we will try to push a fix into a maintenence build for 18.1 too. If needed, I think you can implement an workaround though a custom Edit Map action. Please let me know if you are interested in this approach so I can give you more details.
We would like to know more about the workaround solution which is custom Edit Map action.
Also let us know the 18.1 maintenance date and the next major release planned datewith the bug fix.
Are you refering to the menu associated with the Target field? The one that presents: Cross Reference, FileReference and WebLink as possible values? Unfortunately we don't have an extension point for contributing additional actions. What action would you like to contribute?
We have our own custom action for some external links which is used in our documentation. The custom action we are already using in the main DITA->Link menu and context menu. We would like to add that to the Link option in Image map editor. Also we may need to remove some existing options in the item. Let us know if it is feasible in any way (document type association change or some extensions)

Re: Clarification in Imagemap

Posted: Fri Dec 16, 2016 5:03 pm
by alex_jitianu
Hi,
We would like to know more about the workaround solution which is custom Edit Map action.
After creating the sample SDK project, focus on the oxygen-sample-framework module. Inside oxygen-sample-framework\samples\Oxygen Default Frameworks you will find the sample code for our built-in frameworks, including DITA. The class that corresponds to the Image Map Editor... action is ro.sync.ecss.extensions.dita.EditImageMapOperation . The first code of interest is in its super class: ro.sync.ecss.extensions.commons.operations.EditImageMapOperation:

Code: Select all

String[] asXML = new String[nodes.length];
for (int i = 0; i < asXML.length; i++) {
fragments[i] = documentController.createDocumentFragment(nodes[i], true);
asXML[i] = documentController.serializeFragmentToXML(fragments[i]);
}
You must process these fragments and replace @keyref with the corresponding @href. You can use ro.sync.ecss.dita.DITAAccess.getKeys(URL) for that.
The second point of interest is this one:

Code: Select all

String[] result = ImageMapAccess.getInstance().editMap(
authorAccess,
framework,
authorAccess.getEditorAccess().getEditorLocation(),
uri2ProxyMappings,
ImageMapUtil.getFontOfNodeSize(authorAccess, nodes[0]),
asXML);
You must process the returned fragment and replace the @href with the original @keyref. At this point you could also process all <xref> and change them according with your restrictions (local references with @href and regerences to other topics with @keyref - if I remember correctly)
Also let us know the 18.1 maintenance date and the next major release planned datewith the bug fix.
Version 19.0 will be released sometimes in spring. We've just released a maintenance build for 18.1 so the next one might be in January or February.
Also we may need to remove some existing options in the item. Let us know if it is feasible in any way (document type association change or some extensions)
Unfortunately, right now you can't customize that menu. Bu you can fix the references as described above (in the fragment received from the ImageMapAccess, before inserting it in the document).

Best regards,
Alex

Re: Clarification in Imagemap

Posted: Mon Apr 10, 2017 3:05 pm
by sorin_carbunaru
Hello,

Just wanted to mention that a new maintenance build for 18.1 was released at the very end of January (build2017013018). Version 19.0 is also now available. Both of them have the problem with images and keyrefs fixed.

Kind regards,
Sorin Carbunaru
oXygen XML