View Single Post
Old December 18th, 2017, 07:02 PM
lkain lkain is offline
Forum n00b
Join Date: Mar 2017
Location: Phoenix, AZ
Posts: 6
Question Possible to use CopyfitLine with "Do not break on copyfit"?

Hi all,

As the title indicates, I'm wondering if it's possible to modify the CopyfitLine code in such a way that the line will not break to multiple lines before trying to copyfit.

I currently have the javascript below:

return CopyfitLine("", Field("contactName"), "Helvetica Neue", 9.5, 105.35, 7, false);
However, because I have plenty of room in my text box for the line to break, and because there's a space in the field value ("Firstname Lastname"), it's breaking at the space before it attempts to copyfit. I have "Do Not Break On Copyfit" selected in my text box, but I am guessing that only works on the normal OnCopyfit rule, and not on CopyfitLine.

Is there a javascript function (or other solution) I can use to ensure the line does not break at the space? I should mention, using a non-breaking space isn't a great solution for us, as more often than not, FusionPro will spit out boxes with Xs in them in composition whenever a non-breaking space is used (but that's a different issue altogether).

Any help is appreciated!
Reply With Quote