On 02/02/2016 11:12 PM, Trevor Lango wrote:
Is it possible to override what happens when a user double-clicks an
image-viewport?
Not easily for a third-party developer.
For that you'll have to replace the reference to the stock viewport
found in the CSS by a reference to a custom viewport, that is, Java
classes derived from the stock viewport classes.
XHTML example:
Excerpts from <XXE_install_dir>/addon/config/xhtml/css/xhtml_base.imp
img {
display: inline;
content: image-viewport(attribute, src,
data-type, anyURI,
smooth, true,
content-width, attr(width),
content-height, attr(height));
}
becomes:
img {
display: inline;
content: gadget("com.versaet.xxe.MyImageViewport",
attribute, src,
data-type, anyURI,
smooth, true,
content-width, attr(width),
content-height, attr(height));
}
The stock viewport classes are:
com.xmlmind.xmleditapp.dndview.ImageViewport = Image viewport factory
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/dndview/ImageViewport.html
com.xmlmind.xmleditapp.dndview.ImageViewportVP = Image viewport instance
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/dndview/ImageViewportVP.html
Same thing for DocBook and DITA but with different details.
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support