Line breaks do get inserted when Return/Enter Key is pressed. The issue may be the way that the richValue is being copied over to the other field. Can you supply that code and a sample PDF that exhibits the behavior?
Thank you for your reply.
I am am away from my computer until tomrrow, but will be very happy to provide a sample pdf tomorrow.
I have tried a few different ways, one being
getField(“TextField2”).richValue = getField(”TextField1”).richValue;
Which works except the line breaks are not brought over. Where the line breaks should be there is nothing, so the last character of the last word on line 1 is right up against the first character of the first word of what should be on the second line.
However if I use Shift+Enter instead of just enter, the .richValue is copied over identically.
Im sure there must be a way of doing that automatically though, I can’t expect the form fillers to do this.
I'll take a look. I think the problem is that Acrobat stores it's own wrapping as breaks too and when copying the richValue to another field, it tries to help you in case the fields are different sizes and removes them. I'm sure there's a way to keep them though. I just need to figure it out.
The issue may be the way that the richValue is being copied over to the other field.
This is the case.
When using the RTF format, line breaks are always lost in duplicated fields, also when importing/exporting data.
I reported this bug about 3 years ago to Adobe (july 2014).
I'm still waiting for the fixup…
I remember this one from way back. Rich text was never well used, so it just doesn't get updated. You know there are a whole bunch of undocumented span attributes. There's an amazing set of text/paragraph formatting parameters,. They are however poorly supported, as well as not being documented. Adobe has dropped the ball on a lot of JS functionality, especially the fringe stuff