Tinderbox Forum

Embedding images in $Text attribute

aTbRef states that images may be embedded in $Text attributes by dragging a supported format image onto a map view, where a picture adornment will be created whose $Text attribute contains the image:


I’ve tried this with both jpg and png images and while the picture adornment is created, it is not embedded in the $Text attribute.

Also, copy of the adornment image followed by an attempted paste into the text window doesn’t work. This doesn’t surprise me since the datatype of $Text is string, but I wonder what magic I’m missing.

aTbRef is mistaken; this will create an image adornment, but the image isn’t stored in $Text.

TL;DR - the aTbRef notes are correct but I don’t think the underlying assumption are clear enough and thus the confusion arises. Will fix.

Edit: actually, a few procedural points re notes [sic] were wrong and I’ve fixed then - see my second post below).

Re-reading the linked notes, the reader has assumed comments about notes also apply to adornments. Although I don’t think that’s what my notes say they aren’t intended to confuse. I’m on the road in Prague for Hypertext 2017 and without the aTbRef master file but have made a note to review and clarify these issues.

As things can change, I’ve re-tested (v7.1.0) and the notes are correct except for one point. A 'picture adornment, created via dragging or pasting an image to a map view, stores the image in <image> and not <rtfd> in the source TBX.

My understanding is the original design intent was that adornments didn’t have any text ($Text), just a title ($Name). However, users found the app design still allowed users to add $Text, e.g for hidden comments about the adornment. But $text is adornments is not displayed in the main view, i.e. on the map

Images dragged/pasted directly to the map form ‘picture’ adornments. The picture data is not stored as part of text be separately. A normal adornment can’t be converted into a picture adornment nor is the reverse possible, due to the way and image adornment is created directly in the main view.

Testing, it appears you can add pictures to $Text of both normal and picture adornments, but as $Text is not displayed you don’t see that image in the map view.

To copy the picture in a picture adornment you copy/paste the adornment. If the source has a title or text that too is copied. The title of the newly pasted copy is the same as the source (on ’ copy’ suffix unlike with a copied note). So if you do use titles for your adornments (useful for finding/selecting them) you should rename the new copy and or/delete any $Text.

I hope that helps.

OK, I’ve re-edited the two notes @SkylarkMichelle had cited plus a few others. N.B. for now these edits are in the online HTML page only. I’ll update the TBX once back from HT17. Articles edited:

Now the manner and range if image/texture use seems to have settled, I need to add a new article on image/texture/icon use and cross-refer the many(!) different ways in which Tinderbox now allows the user employ image data.

@SkylarkMichelle – drag or paste your image into the text of a note. It will be viewable there and in the note in your map.

1 Like

Hi Paul,

While drag and drop into the text pane works, unlike your example, my image doesn’t show up in the map view:

Is there an attribute I need to use?

Select the note and open the QuickStamp inspector. Look at $MapBodyTextSize, which is in the Map category of system attributes. If

  • $MapBodyTextSize==0 then the image will display
  • $MapBodyTextSize==1 then the image will NOT display
  • $MapBodyTextSize is some value greater than 1, then the image will scale up in size depending on the value assigned to the attribute

Sometimes the Prototype you are using might set $MapBodyTextSize=1 and that non-displaying state will get inherited by notes that use the Prototype.

1 Like