Formatierungen in Tiddlywiki

110 views
Skip to first unread message

Gerald Weis

unread,
Jan 16, 2018, 1:03:11 PM1/16/18
to TiddlyWiki
Bisher transcludiere ich einen Tiddler mit folgendem Inhalt

@@color:white;
@@background-color:red;
@@width:200px;
@@border: 2px solid red;
![img width=30px [Bilder/UBUNTU-Achtung.png]]   ''^^Achtung^^''
@@

Der zeichnet mit das Logo und die Überschrift wenn etwas gefährlich ist.
Danach kopiere ich den Inhalt eines zweiten Tiddlers an diese Stelle.

@@background-color:#f2f2f2;
@@border: 2px solid red;
@@padding:20px;
hier den ACHTUNG-Text eintragen
@@

An der Stelle mit dem Text "hier den ACHTUNG-Text eintragen" schreibe ich dann den Text de einen Rahmen haben soll und eine bestimmte Hintergrundfarbe.

Geht das nicht einfacher?

Danke für eure Hilfe

Mark S.

unread,
Jan 16, 2018, 1:50:28 PM1/16/18
to TiddlyWiki
I may not understand the question. Perhaps you want something like this:

@@color:white;
@@background-color:red;
@@width:200px;
@@border: 2px solid red;
![img width=30px [Bilder/UBUNTU-Achtung.png]]   ''^^{{$:/ACHTUNG}}^^''
@@


@@background-color:#f2f2f2;
@@border: 2px solid red;
@@padding:20px;
<$edit-text tiddler="$:/ACHTUNG" size=50 default="hier den ACHTUNG-Text eintragen"  tag="input" />
@@

Ton Gerner

unread,
Jan 16, 2018, 2:05:40 PM1/16/18
to TiddlyWiki
Hi Gerald,

I think you need to create a stylesheet, a tiddler tagged with $:/tags/Stylesheet, containing something like:

.Achtung1 {
     color
:white;
     font
-size: 1.3em;
     font
-weight: bold;
     background
-color:red;
     width
:200px;
     border
: 2px solid red;
}

.Achtung2 {
     background
-color:#f2f2f2;
     border
: 2px solid red;
     padding
:20px;
}

And a macro, a tiddler tagged with $:/tags/Macro, containing something like:

\define Achtung(text)
<div class="Achtung1">
[img width=30px [Bilder/UBUNTU-Achtung.png]] ^^Achtung^^
</div>
&nbsp;
<div class="Achtung2">
$text$
</
div>
\end

Then you can call your 'warnings' like:

<<Achtung "hier den ACHTUNG-Text eintragen">>

Cheers,

Ton


Gerald Weis

unread,
Jan 18, 2018, 11:52:51 AM1/18/18
to TiddlyWiki
Hi Ton,

Thanks, it works fine.
Reply all
Reply to author
Forward
0 new messages