PDA

View Full Version : How to add new line in story or table fields?



TheSwartz
April 22nd, 2019, 17:06
How do I add lines WITHIN a cell for a table (CTRL+6), or within a single story element (CTRL+3)?

I have seen this in a table an officially released module; not sure about stories. I searched the wiki, can't seem to find an example of how to do it. Does it require manually editing the XML?

"Enter" adds a new row within tables, and takes you out of a story box.

Examples:

For tables, I want:



1
Monster A
Monster B
Monster C
Monster D


2
Monster E



instead of:



1
Monster A, Monster B, Monster C, Monster D


2
Monster E



or:



1
Monster A




Monster B





Monster C





Monster D



2
Monster E




And, for Story I want:



Poem line 1,
Poem line 2,
Poem line 3.



instead of:



Poem line 1, Poem line 2, Poem line 3.



or:



Poem line 1,





Poem line 2,





Poem line 3.




Any ideas?
Thanks!

esmdev
April 22nd, 2019, 17:50
Right click and add table

1 [Control-Tab] Monster A [Enter]
[Control-Tab] Monster B [Enter]
[Control-Tab] Monster C [Enter]
[Control-Tab] Monster D [Enter]
2 [Control-Tab] Monster E [Enter]

Zacchaeus
April 22nd, 2019, 18:19
For the tables you are limited to one line per cell unless you have a bunch of text which will get formatted just like a paragraph. So you can't have a one cell to the left and then multiple single lines in the next cell. So you can't have what you are looking for in your first picture.

For line breaks inside a chat frame you are going to have to go into the XML and add those in manually. Add at the end of each sentence that you want a line break.

Talyn
April 22nd, 2019, 20:23
Anytime you want to force a line break, you have to edit the XML and add an ASCII 13 character. Like for your first table example, you'd do:

(I haven't figured out how to correctly escape ASCII codes in BBCODE yet, so substitute these "#13" for the actual ASCII 13 code)


<td>Monster A#13Monster B#13Monster C#13Monster D</td>


The same would apply to your poem:


<p>Poem line 1,#13Poem Line 2,#13Poem line 3</p>


As you're seeing, a single ASCII 13 only breaks to the next line. If you want to simulate a paragraph break, such as in <frame> 'boxed text' you'd use two ASCII 13s to do that, like so:


<frame>Boxed Text Paragraph 1 Lorem ipsum dolor sit amet, no usu natum efficiendi. At cum malorum oportere, causae dolorum pri id. Nec vituperata efficiendi ad, eu cum hendrerit scriptorem, sea ex elitr consul. Malorum nostrum antiopam ea sit, id mazim aperiam vix. Liberavisse signiferumque has ad. Ex quo detraxit tincidunt, blandit prodesset argumentum ea sit.#13#13Boxed Text Paragraph 2 Et sit paulo epicurei honestatis, cu quot nulla perfecto vim, eros atomorum scripserit mel at. Nec cu ferri timeam assueverit, his te partem latine expetendis, ius erroribus instructior in. Id sed hendrerit omittantur, no pro habeo constituto conclusionemque, et his periculis reprimique eloquentiam. Adhuc temporibus pro at, ad everti hendrerit definiebas nam. Vero prima quaestio eam ne. Iusto signiferumque cu usu.</frame>

TheSwartz
April 22nd, 2019, 20:37
For the tables you are limited to one line per cell unless you have a bunch of text which will get formatted just like a paragraph. So you can't have a one cell to the left and then multiple single lines in the next cell. So you can't have what you are looking for in your first picture.

For line breaks inside a chat frame you are going to have to go into the XML and add those in manually. Add at the end of each sentence that you want a line break.

So, I don't know if this is the intended effect, but I found that
&#xA; works both as a line break for tables and for story (when entered manually into the aXML). Since I'm not experienced with XML, I found a few different codes when searching, this is the only one that's worked :)


[Edit] Correction: for chat, it shows the way I intend within the text a story page, but when I click the message bubble, it only outputs the first line into the chat box.

Anytime you want to force a line break, you have to edit the XML and add an ASCII 13 character.

Also - Sorry, I posted this probably right when the prior post was placed. Thanks, I'll check this out next!

TheSwartz
April 22nd, 2019, 21:02
Anytime you want to force a line break, you have to edit the XML and add an ASCII 13 character. Like for your first table example, you'd do:


(I haven't figured out how to correctly escape ASCII codes in BBCODE yet, so substitute these "#13" for the actual ASCII 13 code)


OK. yes, this works for both tables and chat. And, ya, I'm not sure how to post it correctly, but I'm using what I found here: https://www.rapidtables.com/code/text/ascii/ascii-enter.html

Thanks!

Elihu
June 9th, 2020, 04:15
tried to solve this without XML, didn't find a way.

Trenloe
June 9th, 2020, 07:06
tried to solve this without XML, didn't find a way.
There isn’t a way to do it outside of editing the XML.

Werethunder
May 29th, 2021, 12:53
Well... I do not know if this will help, but it is seemingly working for me: try to copy the text from a simple text editor (e.g., Notepad) and paste it in a table cell.

jharp
October 6th, 2021, 04:09
There isn’t a way to do it outside of editing the XML.

If I understand the original post (I realize it is an old post), the table and story wishes can be accomplished with shift-enter when you want a new line but not a new row. This inserts a soft return rather than a hard return. This can also be used in almost all text entry fields (maybe all) in FG and most other programs in windows. I don't know if OSX/Linux does the same.

Jason