undyingking: (Default)
undyingking ([personal profile] undyingking) wrote2006-03-02 12:47 pm
Entry tags:

TagClouder

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>?
chrisvenus: (Default)

[personal profile] chrisvenus 2006-03-02 05:51 pm (UTC)(link)
It hadn't occured to me that you might do anything other than put it on the span tags, to be honest. :)

[identity profile] undyingking.livejournal.com 2006-03-03 12:38 pm (UTC)(link)
I thought it was probably better practice to put it in the a tags and thus do without clunky spans altogether, but so much for that rare impulse towards clean code...
chrisvenus: (Default)

[personal profile] chrisvenus 2006-03-03 12:46 pm (UTC)(link)
possibly. I may be confused by different versions and stuff but when you were using classes they were on span tags rather than the anchors weren't they? I figured that if you were putting classes on spans that you'd put inline style on spans. If you were going to put the styles on the anchors then I'm not sure why not put the classes on anchors too.

Best practice I think you are right though that the anchors should have the styles on them directly. This is fairly important if you are doing things like colours since the default of anchors being in a differnet colour will likely override you if you aren't careful when putting styles outside the anchors.

I guess the nasty regexs you were talking about were converting the spands with classes on into anchors with styles on? If so then just change both to have classes and styles on the anchors. Unless there is a reason I missed not to of course in which case don't.

I'm still desperately trying to be useful in the hopes that I can reclaim those thanks that I was denied! :)

the hopes that I can reclaim those thanks

[identity profile] undyingking.livejournal.com 2006-03-03 01:03 pm (UTC)(link)
Pointing out that I'm talking nonsense isn't necessarily the best way to do that ;-)