View Full Version : What HTML Attributes are available in FG2?
RKBrumbelow
March 14th, 2011, 00:46
It would be very nice to know exactly what html attributes are rendered by FG2. Right now it seems like thinly way to find out is to add one attribute at a time and see what happens. For example the Table tag does not seem to render the "Width" attribute.
Zeus
March 14th, 2011, 00:58
Not sure why its not in the online documentation however the HTML support for formattedtext fields is documented over at the FGWiki (https://oberoten.dyndns.org/fgwiki/index.php/Formatted_Text)
RKBrumbelow
March 14th, 2011, 01:24
According to the Wiki, colspan is the only attribute supported. Font Attributes Size, Family & Color are also supported. Width, bgcolor, border do not seem to be supported though.
What about other attributes?
Zeus
March 14th, 2011, 01:33
Font Attributes Size, Family & Color are news to me!!! I'll have to give that a try. As far as I know the FGWiki is the only known documented source at the moment, so really can't say.
Perhaps moon_wizard could review the code for the formattedtext field type and let us know what other HTML attributes are supported.
Moon Wizard
March 14th, 2011, 01:58
The formattedtextcontrol and formattedtextfield objects do not so much support HTML, as they use similar tags to document similar effects.
Here is the complete list of tags used by the formattedtext objects:
<p> = standard text
<h> = heading text
<frame> = chat text
<frameid> = speaker for chat text
<list> = standard list
<li> = list item text (with attribute indent)
<linklist> = list of shortcuts
<link> = shortcut list item text (with class and recordname subtags)
<table> = table
<tr> = table row
<td> = table cell (with attribute colspan)
<b> = bold
<i> = italic
<u> = underline
Cheers,
JPG
RKBrumbelow
March 14th, 2011, 02:42
Thanks JPG, but I wanted to know about attributes not the tags that they are embedded in.
As to the tags tbody seems to be supported as well.
Can you tell me what attributes are supported?
VenomousFiligree
May 7th, 2011, 22:49
does tr not have attribute decoration underline too?
Moon Wizard
May 7th, 2011, 23:19
Looking at the code, the only attributes supported are the two I noted in the tag summary above. (li -> indent, td -> colspan)
Regards,
JPG
VenomousFiligree
May 7th, 2011, 23:21
Must be something thats added in specific rulesets (BRP at least)
StuartW
May 9th, 2011, 16:17
Nope, tr has a decoration attribute in the base product, it isn't a BRP addition. As per DrZ, this is documented in the FGWiki, but I wasn't aware of the indent attribute for the li tag.
Stuart
Zeus
May 10th, 2011, 01:04
Looking at the code, the only attributes supported are the two I noted in the tag summary above. (li -> indent, td -> colspan)
Regards,
JPG
That's odd, <tr decoration="underline"> seems to also be supported.
Must be something thats added in specific rulesets (BRP at least)
It can't be. A ruleset can't define/override an FGII API XML tag.
Nope, tr has a decoration attribute in the base product, it isn't a BRP addition. As per DrZ, this is documented in the FGWiki, but I wasn't aware of the indent attribute for the li tag.
Agree with Stuart. I too wasn't aware of the <li indent=[number]> attribute option.
demonsbane
May 10th, 2011, 01:14
That's odd, <tr decoration="underline"> seems to also be supported.
I was using it, but, in my experience... it does nothing. Seems to be entirely superfluous code.
If someone had a different result, I'm all ears.
StuartW
May 10th, 2011, 06:16
I stand corrected, decoration="underline" seems to have been withdrawn somewhere along the way. It no longer does anything on my machine either.
Stuart
RKBrumbelow
May 10th, 2011, 06:24
I have not done it yet, part laziness part health reasons, but what needs to be done is a table with one element in each cell to show what renders and what doesn't. I suspect there is a rendering library somewhere in the code picking these items up and rendering them as we have already documented things that theoretically should not be rendered.
Doswelk
May 10th, 2011, 19:21
I stand corrected, decoration="underline" seems to have been withdrawn somewhere along the way. It no longer does anything on my machine either.
Stuart
It used to work I know I used it back in my D20Modern/AE days!
StuartW
May 10th, 2011, 19:31
Where do you think I stole the idea?
:D
Griogre
May 10th, 2011, 21:47
I used it in Shaintar too.
demonsbane
May 11th, 2011, 21:45
I stand corrected, decoration="underline" seems to have been withdrawn somewhere along the way. It no longer does anything on my machine either.
It used to work I know I used it back in my D20Modern/AE days!
I used it in Shaintar too.
So, for some reason there was a removal of attributes that were working in FG2? This sounds odd to me.
Conversely, I miss some additional attributes, like one for being able to shade some rows in tables, and keep others unshaded, alternatively.
This is a classic way of presenting tablet, and it would make them much more readable, and people did this with the RMC ruleset (look the relevant screenshots in the animated gifs (https://www.ironcrown.com/?p=1404)).
StuartW
May 11th, 2011, 22:08
I was the 'people' who did this in RMC, but it wasn't using HTML/formattedtext fields: it was using standard FG window classes etc. I agree that shading or a bgcolor would be a great boon.
Stuart
Moon Wizard
May 13th, 2011, 19:01
I definitely didn't remove any attributes, so not sure when it was removed. It has been that way for over a year.
Regards,
JPG
VenomousFiligree
May 13th, 2011, 19:14
I definitely didn't remove any attributes, so not sure when it was removed. It has been that way for over a year.
Regards,
JPG
Any chance of getting it back? :)
Moon Wizard
May 13th, 2011, 20:30
You should be able to emulate the same behavior by wrapping the text in each cell with <u> tags.
Not sure if this is where I should be spending my dev time. ;)
Cheers,
JPG
VenomousFiligree
May 13th, 2011, 20:35
Fair one, point taken! :)
Will try the underline.
StuartW
May 14th, 2011, 10:35
You don't get the same behaviour, as the underline only extends as far as the text is wide, not the full width of the cell. That said, I'd agree about relative priorities.
Stuart
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.