TagClouder

Mar. 2nd, 2006 12:47 pm
undyingking: (Default)
[personal profile] undyingking
I've added a feature to the TagClouder such that it now offers you the raw HTML to paste into your own page, etc. Unfortunately it comes out like this:


books car

Get your own tag cloud from the UKG TagClouder!




Presumably LJ is stripping out the <style> ... </style> for security reasons or some such... any thoughts for ways round this? I could go back to doing it with text attributes I suppose, but that seems a bit retrograde...
Any thoughts about this or further improvements welcome!


Edit: now a trial with no internal style spec, but linking to an external stylesheet:
books car

Get your own tag cloud from the UKG TagClouder!


Bah, no better.


Edit: now a trial with inline style:
books car

Get your own tag cloud from the UKG TagClouder!


oho! -- that looks more promising. Unfortuatnely it involves hacking into the <a> tag, which I'm keen to avoid doing as it will require all manner of hideous regexping. And it this way really any better than using <font>?

Date: 2006-03-02 01:19 pm (UTC)
From: [identity profile] wimble.livejournal.com
Ah. That'll be my fault, I suspect ;-)

It's not stripping out the style tags, as an examination of the source for this page shows:
<span class="size4"><a href="http://undyingking.livejournal.com/tag/books">books</a></span> <span class="size2"><a href="http://undyingking.livejournal.com/tag/car">car</a></span> <span class="size2"><a href="http://undyingking.livejournal.com/tag/cats">cats</a></span> <span class="size2"><a href="http://undyingking.livejournal.com/tag/christmas">christmas</a></span>


The problem, of course, is that it doesn't have any definitions in the CSS for what those styles should look like :(

(Reposted using blockquote tags, rather than pre tags, in order to improve the resulting layout)

Date: 2006-03-02 03:55 pm (UTC)
From: [identity profile] wimble.livejournal.com
Rather than hacking the <a> tags themselves, you could put the style information into the span tags.

So, on your site
.size4 { size4-style-rules; }
<span class="size4"<...>/span>


And for export:
<span style="size4-style-rules;">...<span>


Which isn't really a great advantage, but it does mean that the rest of the content is unchanged.

Profile

undyingking: (Default)
undyingking

March 2012

S M T W T F S
     123
4 5678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 30th, 2025 11:29 pm
Powered by Dreamwidth Studios