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 :[image: 
Tips_Visu.png]
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 : 
[image: 2024-08-16_14h54_41.png]

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 :

[image: 2024-08-16_14h59_46.png]

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. ;-)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8226a196-76cb-4975-9d33-9e383c75e1e4n%40googlegroups.com.

Reply via email to