Hi everyone,
I work on tiddlywiki for 5 weeks. and I want to customise tips blockquote for user.
My users have no knowledge in code. so I want to create snippet and macro to create blockquote for tips, warning and Importante informations.
for exemple, for tips i would like generate something like this :
to do that I use this code :
<blockquote class="Tips_BQ">
<div class="Tips_body">
<$transclude tiddler="$:/core/images/tip" class="tips-icon"/>
<strong class="tips-Title">Tips</strong>
<div class="tips-text">
Ceci est une liste de conseil :
<ul>
<li>premier élément</li>
<li>second élément</li>
</ul>
</div>
</div>
</blockquote>
(Sorry about the formatting, I couldn’t find the tag for the code.)
but for a result like this I add some html code.
I try something like this :
\define InsertTips(text)
<blockquote class="Tips_BQ">
<div class="Tips_body">
<$transclude tiddler="$:/core/images/tip" class="tips-icon"/>
<strong class="tips-Title">Tips</strong>
<div class="tips-text">
$text$
</div>
</div>
</blockquote>
\end
<<InsertTips "Ceci est une liste de conseil :
<ul>
<li>premier élément</li>
<li>second élément</li>
</ul>
">>
it’s working, but there are again html code for user. So I try something like this :
\define InsertTips(text)
<blockquote class="Tips_BQ">
<div class="Tips_body">
<$transclude tiddler="$:/core/images/tip" class="tips-icon"/>
<strong class="tips-Title">Tips</strong>
<div class="tips-text">
$text$
</div>
</div>
</blockquote>
\end
<<InsertTips "Ceci est une liste de conseil :
* premier élément
* second élément
">>
but the result is not good :
because is not in list.
And finally I try like this :
\define InsertTips(text)
<blockquote class="Tips_BQ">
<div class="Tips_body">
<$transclude tiddler="$:/core/images/tip" class="tips-icon"/>
<strong class="tips-Title">Tips</strong>
<div class="tips-text">
<$wikify name="wikify_Text" text={{!!text}} output="html">
<$transclude tiddler=wikify_Text />
$text$
</$wikify>
</div>
</div>
</blockquote>
\end
<<InsertTips "Ceci est une liste de conseil :
* premier élément
* second élément
">>
so the blockquote it’s created but without text inside :
I don’t understand How I can transmit tiddly text inside macro variable and transform like html code to have liste inside tips blockquote.
Someone can help me to resolve this point please ?
(I try with ChatGPT but it’s have no accurate and good solution for this problem ^^)
P.S: I’m sorry for my english, I try to improve it but it’s not my native langage.