What selections can be dragged from a web browser?
Whether Tinderbox receives both URL and a link title/anchor text is depends on the browser, Tinderbox will use both if passed, otherwise a bare URL is received.
Browsers do not allow dragging of a selection webpage content unless it includes at least one link (a visible URL or a link anchor text).
Clicking in the location bar of a browser, where the (partial) URL is shown will select it and allow it to be dragged.
Note that if dragged page content contains HTML such as lists of links, Tinderbox may try to parse these into a container holding two or more discrete notes. However, this article is intended to cover dragging content with a single URL into either the view pane (to make a new note) or into a note's text area.
Dragging a URL onto a view background
Drag a URL from Safari or other web browser onto a view window background makes a new note (in all view types except Attribute Browser, Crosstabs and Hyperbolic). The location of the new note varies by view type:
- Outline, Chart. By default the new note is the last top-level sibling (i.e. child of root or a hoisted root scope). By hovering the cursor close to a note, the new note can be a previous/next sibling or child of an existing note at any level at root or in a branch.
- Timeline. Always the last child of the root of the view. The new note will appear in the 'No Date' sidebar as it will have no $StartDate at this point.
- Treemap. By default the new note is a top-level sibling (i.e. child of root or a hoisted root scope). Essentially as for Outline but without the fine positioning option.
- Map. Creates a new note at the drop point. If the drop is onto an existing note, the new note is created as a child of that note.
- Attribute Browser, Crosstabs, Hyperbolic view. Drop data is not accepted, so nothing happens.
What note content is added for drag-to-view created notes?
If the drag is from the browsers location (URL) bar the dragged data is usually only the (full https://...etc.)
The drop action always sets $URL value, adds $URL as a Displayed Attributes, sets the note's title and its text. There can be some variations depending on the data supplied with :
- $URL is set to the dropped URL.
- The Displayed Attributes ($DisplayedAttributes) of the new note is set to "URL". Note that if the container of the new note has an OnAdd setting Displayed Attributes directly or via an attribute, this setting is overwritten to show $URL. Reset $DisplayedAttributes to restore the inherited value.
- The new note's $Name is set to the value of the source URL, unless a title (e.g. the source page's anchor text) is parsed out in which case the title is used in preference.
- The new note's $Text is set to the value of the source URL, unless a title (e.g. the source page's anchor text) is parsed out in which case the title is added as a weblink, pointing to the URL. in preference. If only the URL is added, no weblink results.
Dragging a link from a webpage onto a note's text
At the drop position, the receiving note's $Text is set to the value of the source URL, unless a title (e.g. the source page's anchor text) is parsed out in which case the title is added as a weblink, pointing to the URL. in preference. If only the URL is added, no weblink results.
The drop also sets window sets the note's $URL value (but will not overwrite any pre-existing $URL value).
See also results of pasting webpage data to $Text.
Dragging a link from a webpage onto a note's Displayed Attributes table
If the URL is dragged onto the Displayed Attributes and the drop target is a URL-type attribute, then that attribute rather than $URL receives the dropped URL as its value.
Resolving the link title
If the browser does not supply enough data, a drag to the $Text area results in the just the URL string being added to the note as text.
If the dragged object is a browser bookmark the note name will be taken from the bookmark. If the dragged object is a bare URL, Tinderbox will attempt to fetch the title from the URL and set the note name accordingly.
Dragging images from Safari
Dragging an image from Safari to a note window imports the referenced image as opposed to setting the URL attribute.