cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

EXTERNAL: WYSIWYG for tables in Editor view?

ptc-1908075
1-Newbie

EXTERNAL: WYSIWYG for tables in Editor view?

Tables are an exception case when it comes to WYSIWYG, which may or may not be related to tables being the spawn of the devil, as has been suggested. Atable preview sounds like a great feature.

Suzanne


3 REPLIES 3

Ah, another screen FOSI issue 🙂

As Steve indicates, page layout markup is the way to get page break information into the Edit window. However, keep in mind that as soon as the document is changed, page break information may become obsolete and have to be re-established.

As usual, I couldn't resist trying it. The code below works for a two-column table to output the column heads in the row at the top of each page. Note that it doesn't look like a "real" table head row, but the text is there. You may find a better way to handle this.

Note that this code only works for two columns. To support an arbitrary number of columns, I suggest fillvaling the tgroup cols attribute into an enumerat increm with setvalue=1, and using #FOSI to test it. You will need to establish the maximum number of columns that could occur.

Good luck!
Suzanne Napoleon
www.FOSIexpert.com
"WYSIWYG is last-century technology!"

ACL to establish and reset page breaks:
layout::clear();
format layout;
layout::add(0x40)

FOSI to show column headers at page breaks:
<stringdecl textid="tablebrk.yn" literal="n">
<stringdecl textid="col1-header.txt" literal="">
<stringdecl textid="col2-header.txt" literal="">

<e-i-c gi="entry" context="row" thead&quot;=" occur="first">
<charlist inherit="1">
<savetext textid="col1-header.txt" conrule="#CONTENT">
</charlist>
</e-i-c>

<e-i-c gi="entry" context="row" thead&quot;=" occur="last">
<charlist inherit="1">
<savetext textid="col2-header.txt" conrule="#CONTENT">
</charlist>
</e-i-c>

<e-i-c gi="entry" context="row" tbody&quot;=" occur="first">
<charlist inherit="1">
</charlist>
<att>
<specval attname="tablebrk.yn" attloc="#FOSI" attval="y">
<charsubset>
<usetext source="col1-header.txt">
<subchars charsubsetref="block" center=" underline&quot;="></subchars>
</usetext>
</charsubset>
</att>
</e-i-c>

<e-i-c gi="entry" context="*" tbody&quot;=" occur="last">
<charlist inherit="1"></charlist>
<att>
<specval attname="tablebrk.yn" attloc="#FOSI" attval="y">
<charsubset>
<usetext source="col2-header.txt">
<subchars charsubsetref="block" center=" underline&quot;="></subchars>
</usetext>
</charsubset>
</att>
</e-i-c>

<e-i-c gi="row">
<charlist inherit="1" charsubsetref="block">
<savetext textid="tablebrk.yn" conrule="\n\" placemnt="after">
</charlist>
</e-i-c>

<e-i-c gi="table">
<charlist inherit="1" charsubsetref="block">
<savetext textid="col1-header.txt" conrule="\\">
<savetext textid="col2-header.txt" conrule="\\">
</charlist>
</e-i-c>

<e-i-c gi="atipl:startpage">
<charlist inherit="1">
<savetext textid="tablebrk.yn" conrule="\y\">
</charlist>
</e-i-c>


Suzanne, thanks for providing that code, I will experiment with it. The table in question that I am having to deal with will always have 3 columns. The problem I still see (for my users anyway) is that it seems like they will still have to hit a button or some way of triggering the acl lines so the page boundaries get rechecked as I would guess they will not update dynamically even with your fosi code. If this is the best that can be done, I will go with it. Thanks again for your and everyone else's help!

With 3 columns, you can use occur=first, middle, and last for entry e-i-cs.

Maybe some ACL gurus out there have ideas on supporting dynamic updating.

Suzanne


Top Tags