Details
-
Sub-task
-
Resolution: Fixed
-
None
-
High
-
Added support for images and external resources to be displayed center and right panels
-
Empty show more show less
Description
xref and images
Images can be defined in TBX basic as external references of type xGraphic
<xref type="xGraphic" target= "bat.jpg">cricket bat</xref>
<xref type="xGraphic" target="http://upload.wikimedia.org/wikipedia/commons/8/80/Wikipedia-logo-v2.svg">Wikipedia logo</xref>
And links can be defined in TBX basic as external references of type externalCrossReference
<xref type="externalCrossReference" target="wikipedia.org">Wikipedia web site</xref>
Both is in common, that
- We do NOT include or download the linked entity
- Both - the text of the target attribute and the content of the xref-tag itself is shown to the user in the GUI and editable (if the user has the rights)
- If the target is a valid URL, it must be possible to open it in a new tab
- In case of the xGraphic a relative URL does NOT count as valid URL, therefore only the text is shown and it does not open in a tab
- In case of the externalCrossReference if no protocol is part of the target, it is added as http://
Images as referenced by <descrip type="figure"
Images that are shown inside the TermPortal can only stem from a TBX import from a structure like this
<body>
<termEntry>
...
<descrip type="figure" target="fid-cricketbat">cricket bat</descrip>
...
</termEntry>
</body>
<back>
<refObjectList type="binaryData">
<refObject id="fid-cricketbat">
<item type="codePage">base64</item>
<item type="format">jpg</item>
<item type="data">
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a...
</item>
</refObject>
</refObjectList>
</back>
or this
<body>
<termEntry>
...
<descrip type="figure" target="fid-cricketbat">cricket bat</descrip>
...
</termEntry>
</body>
<back>
<refObjectList type="binaryData">
<refObjectList type="binaryData">
<refObject id="id6525c260-cf85-4853-8f61-aa827193b997">
<item type="name">74_Flachkollektor.jpg</item>
<item type="encoding">hex</item>
<item type="format">image/jpeg</item>
<item type="data">ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 60 00 60 00 00 ff e1 00 52 45 </item>
</refObject>
</refObjectList>
</back
are the only images, that are shown in the TermPortal as images.
Images uploaded in the termPortal are saved in this data structure and exported in TBX ĺike this.
The latter of the examples should be used as data structure in TBX exports, as this is the format provided by Across.