mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-07-14 15:52:46 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b799d924f0 |
@@ -0,0 +1,13 @@
|
|||||||
|
title: $:/core/macros/shortcuts/prettylink
|
||||||
|
tags: $:/tags/Macro
|
||||||
|
|
||||||
|
\define x-tm-prettylink-internal(to,text)
|
||||||
|
<$link to=<<__to__>>><$text text=<<__text__>>/></$link>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\define tm-prettylink-internal(to,text)
|
||||||
|
<$button>
|
||||||
|
<$action-navigate $to=<<__to__>>/>
|
||||||
|
<$text text=<<__text__>>/>
|
||||||
|
</$button>
|
||||||
|
\end
|
||||||
@@ -49,13 +49,12 @@ exports.parse = function() {
|
|||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
return [{
|
return [{
|
||||||
type: "link",
|
type: "macrocall",
|
||||||
attributes: {
|
name: "tm-prettylink-internal",
|
||||||
to: {type: "string", value: link}
|
params: [
|
||||||
},
|
{name: "to", value: link},
|
||||||
children: [{
|
{name: "text", value: text}
|
||||||
type: "text", text: text
|
]
|
||||||
}]
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user