1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Add documentation on translink macro (#7426)

* Update Using Excise.tid

Rephrase the last paragraph (note).
Fix some minor formatting.

* Update WidgetMessage_ tm-edit-text-operation.tid

Add link to `translink Macro`

* Create TranslinkMacro.tid

* Create translink.tid
This commit is contained in:
Mateusz Wilczek 2023-05-10 17:38:58 +02:00 committed by GitHub
parent 8f4b22110c
commit 2ab28cc2b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 10 deletions

View File

@ -1,10 +1,9 @@
created: 20160810122928198
modified: 20160810122934291
modified: 20230505104214168
tags: [[Editor toolbar]]
title: Using Excise
type: text/vnd.tiddlywiki
! Excise text
From the EditorToolbar you can export selected text to a new tiddler and insert a [[link|Linking in WikiText]] [[Transclusion]] or [[macro|Macros]] in its place. Click ''Excise text'' (<<.icon $:/core/images/excise>>), input name of the new tiddler, and choose excise method.
@ -12,11 +11,8 @@ From the EditorToolbar you can export selected text to a new tiddler and insert
# Highlight the relevant piece of text
# Click ''Excise text'' (<<.icon $:/core/images/excise>>)
# Give the new tiddler a title.
# Chosse if the new tiddler will be tagged with the title of the current tiddler''*''.
# Choose replacing method. [[link|Linking in WikiText]] [[Transclusion]] or [[macro|Macros]].
# Chosse if the new tiddler will be tagged with the title of the current tiddler (see note below).
# Choose replacing method: [[link|Linking in WikiText]], [[transclusion|Transclusion]], or [[macro|Macros]].
# Click the ''{{$:/language/Buttons/Excise/Caption/Excise}}'' button
''*NOTE:'' If you choose tic the option to `Tag new tiddler with the title of this tiddler`. The tag will be the'' draft title''. If you create a new tiddler (or clone an existing one), the draft title and the tag, will be `New Tiddler`. __You have to save the tiddler and re-edit it to get the new title as tag.__
<<.strong Note!>> If you choose the option to `Tag new tiddler with the title of this tiddler`, the new tiddler will be tagged with the name of the current tiddler before it has been edited. If you have changed the title of the current tiddler, save it first and edit it again to perform excision with this option.

View File

@ -0,0 +1,21 @@
created: 20230505090333510
modified: 20230505090333510
tags: Macros [[Core Macros]]
title: translink Macro
type: text/vnd.tiddlywiki
caption: translink
The <<.def translink>> [[macro|Macros]] returns a frame with the title and [[transcluded|Transclusion]] text of a chosen tiddler. The title links to the transcluded tiddler.
If the chosen tiddler is missing, an appropriate message will be shown instead of the transcluded text.
This is the default macro used when [[excising|Using Excise]] text and replacing it with a macro.
!! Parameters
; title
: The title of the tiddler to be transcluded
; mode
: The mode of the [[transclude widget|TranscludeWidget]] used inside the macro, defaults to `block`
<<.macro-examples "translink">>

View File

@ -0,0 +1,9 @@
created: 20230505092952569
modified: 20230505092952569
tags: [[translink Macro]] [[Macro Examples]]
title: translink Macro (Examples)
type: text/vnd.tiddlywiki
<$macrocall $name=".example" n="1" eg="""<<translink "Philosophy of Tiddlers">>"""/>
<$macrocall $name=".example" n="2" eg="""<<translink "Philosophy of Tiddlers" inline>>"""/>
<$macrocall $name=".example" n="3" eg="""<<translink Foo>>"""/>

View File

@ -13,7 +13,7 @@ Excises the currently selected text into a new tiddler and replaces it with a li
|!Name |!Description |
|title |Title of the new tiddler the selected content is excised to|
|type |Type of the replacement to be inserted: Can be one of <<.value "transclude">>, <<.value "link">> or <<.value "macro">>|
|macro |In case //type=<<.value "macro">>//, specifies the name of the macro to be inserted. The title of the new tiddler is provided as the first parameter to the macro. Defaults to the ''translink'' macro|
|macro |In case //type=<<.value "macro">>//, specifies the name of the macro to be inserted. The title of the new tiddler is provided as the first parameter to the macro. Defaults to the [[translink macro|translink Macro]]|
|tagnew |If '<<.value "yes">>', will tag the new tiddler with the title of the tiddler currently being edited |
</div>