Convert image:url(''); to tiddler with attached image?

9 views
Skip to first unread message

Måns

unread,
Nov 22, 2009, 11:51:53 AM11/22/09
to TiddlyWiki
Hi TwWizards
Can you help me to change an image:url('http://xx.com/xx.gif'); to
point at an embedded/attached image in a tiddler. (Tiddler name:
xx.gif)

This is what I have in my StyleSheet:

.postityellow {
border:0px solid #dd8;
padding-left:2.0em;
padding-top:1.0em;
padding-bottom:0.5em;
background-image:url('http://xx.com/Notepad.gif');
background-repeat:repeat-y;
background-attachment:scroll;
background-position:0px;
font-family:"Marker Felt", "Comic Sans MS", "Comic Sans", Sans;
font-size:16px;
line-height:20px;
}

I use it with a custom ViewTemplate (NoteViewtemplate) via Erics
taggedtemplateTweak.
<div class='viewer postityellow' macro='view text wikified'></div>
This way I get a notepad background for all tiddlers tagged with Note.
See: http://notabene.tiddlyspot.com/#testunderunderemne

I have attached Notepad.gif http://notabene.tiddlyspot.com/#Notepad.gif
Do I have to use the url (like above) of the tiddler or can I change
"background-image:url('http://xx.com/Notepad.gif');"
to :background-image:Notepad.gif;
(tried that - but it didn't work..)

YS Måns Mårtensson

Tobias Beer

unread,
Nov 22, 2009, 2:46:37 PM11/22/09
to TiddlyWiki
Afaik...


.postityellow {background-image: url('[[ImgTiddlerTitle]]');}


...should do.

Tobias.

Måns

unread,
Nov 22, 2009, 3:43:41 PM11/22/09
to TiddlyWiki
Hi Tobias

I was sure I had tried that one - but no... For some reason I removed
the "url" expression - and nothing worked..
Now it seems to work as intended - and I've put the dropbox url in the
attached image tiddler, hoping that it will be fetched, when the
document is used in IE..

Thanks for getting me back on track again...

YS Måns Mårtensson
Reply all
Reply to author
Forward
0 new messages