TiddlyWiki5/editions/tw5.com/tiddlers/widgets/AnchorWidget.tid

35 lines
1.1 KiB
Plaintext

caption: block id
created: 20230916061829840
modified: 20230922150245402
tags: Widgets
title: AnchorWidget
type: text/vnd.tiddlywiki
! Introduction
The block id widget make an anchor that can be focused and jump to.
! Content and Attributes
The content of the `<$anchor>` widget is ignored.
|!Attribute |!Description |
|id |The unique id for the block |
|previousSibling |`yes` means the block is before this node, in parent node's children list, else it means the block is this node's direct parent node. |
See [[Block Level Links in WikiText^🤗→AddingIDforblock]] for WikiText syntax of block ID.
! Example
<<wikitext-example-without-html """The block id widget is invisible, and is usually located at the end of the line. ID is here:<$anchor id="BlockLevelLinksID1"/>
[[Link to BlockLevelLinksID1|AnchorWidget^BlockLevelLinksID1]]
""">>
<<wikitext-example """You can refer to the block that is a line before the block id widget. Make sure block id widget itself is in a block (paragraph).
ID is here:<$anchor id="BlockLevelLinksID2" previousSibling="yes"/>
[[Link to BlockLevelLinksID2|AnchorWidget^BlockLevelLinksID2]]
""">>