I’m wondering if it is possible to have copy fit for a table cell?
Basically, I need my table rows to stay at a set height and width so need to shrink to fit the text that goes into a cell if it is larger than the cell.
I started out using text boxes so I could utilise the copy fit option, but a table would be better as some of the rows are shown conditionally.
The Copy Fit feature cannot be applied to a table cell (<td>-element). However, I expect that you can achieve something similar by writing some JavaScript code but this will require some experience with JavaScript and, unfortunately, I do not have a working example available.
Perhaps the following forum post can give you some help?
You cannot apply Copy Fit directly to a table cell since it is meant to be applied to a div, but you can apply it indirectly by wrapping the table cell content in a div. See this example: CopyFit.OL-template (7.2 KB)
In preview mode it looks as follows. The top table does not use Copy Fit, but the bottom table does.