View Full Version : Need help with spacing inside field
George Loken
June 8th, 2009, 23:10
Whenever I use a formattedtextfield or stringfield and enter data into it removes all the blank spaces
IE
1 2 3
Becomes
1 2 3
Is their an xml attribute I can set to keep the spaces?
Thanks
Tenian
June 8th, 2009, 23:13
If it's a formattedtext field you can format it using
<table>..</table>
The FGII wiki covers this.
String fields you can not format.
George Loken
June 8th, 2009, 23:32
if this is what you are refering to
https://oberoten.dyndns.org/fgwiki/index.php/Formatted_Text
I am still quite lost.
Inside the FG application when I use spacing even inside a formattedtextfield it never saves the blank spaces.
Griogre
June 9th, 2009, 02:09
That's correct. FG strips out spaces unless they are in a table. If you really want space like that you need to make a table in the XML file. That wiki article tells how to make a table. Here's an example with a header line in bold:
<table>
<tr decoration="underline">
<td colspan="2">
<b>Bolded Double Wide Header</b>
</td>
<td>
<b>Bold Column 2 Header</b>
</td>
<td>
<b>Bold Column 3 Header</b>
</td>
<tr>
<td colspan="2">Row 1, Col 1 Wide</td>
<td>Row 1, Col 2</td>
<td>Row 1, Col 3</td>
</tr>
</table>
Be aware you can't make a table except in the XML file. It's not possible to make one in FG, you have to load the XML file into an editor and do it by hand.
George Loken
June 9th, 2009, 15:12
That is unfortunatley what I thought but just wanted to confirm so this can only be done behind the scenes (by the mod builder) and is something that is not availbe to the end user entering data into the FG application?
Foen
June 9th, 2009, 21:29
An end-user GM can also edit xml, you don't have to be a mod builder. That said, it is limited to folks who know/are comfortable with html.
Sorry I can't help further,
Foen
Lithl
June 10th, 2009, 02:05
Can the Lua edit the table? You could conceivably come up with a script that automatically turns input into a table if that's what you're looking for.
Tenian
June 10th, 2009, 02:27
Haha. Formattedtext is a blackhole of ruleset development. getValue() and setValue() do not exist.
There isn't even a library page on formattedtext :)
George Loken
June 10th, 2009, 17:20
An end-user GM can also edit xml, you don't have to be a mod builder. That said, it is limited to folks who know/are comfortable with html.
Sorry I can't help further,
Foen
How would they do this? Mannualy go into the data file and modify the .xml in the database file?
Foen
June 10th, 2009, 17:45
Yes, for active adventures db.xml contains the story information in formatted text fields (look for the encounters xml element). make sure you take a backup copy of db.xml before you muck around with it: losing your campaign is a horrible experience.
Foen
George Loken
June 10th, 2009, 19:46
Ok thats what I figured it might be fine for the games I run but likley not a good idea for my DM friend with no xml experience.
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.