Expand my Community achievements bar.

How to "set default paste" in text field with rich text format

Avatar

Level 2

When I copy and paste a text of size 10 in a text field, the text is copied in size 12.

Someone has ever been in this situation?

How can I copy a text while retaining the right format?

13 Replies

Avatar

Level 10

Hi,

I you set the text field to a Field Format (on the Field tab of the Object Palette)  to rich text, then the value pasted will retain the source font size.  Otherwise it will change to whatever has been set for that field.

Regards

Bruce

Avatar

Level 2

Thank you for reply. I want to use "Rich text" but when i pasted the text, i see a different style and size.

This is an example:

rich text.png

Avatar

Level 10

Hi,

That is the behaviour I would expect from a plain text field, is the Field Format set to Rich Text

Field Format.PNG

Avatar

Level 2

This is the result with the Field Format set to Rich Text! Help me

ice_screenshot_20161028-084949.png

Avatar

Level 2

The result with Expand to fit for the Width and the Field Format set to Rich Text is this:

ice_screenshot_20161028-092140.png

Avatar

Level 10

Hi,

What is the source of the text you are trying to paste?  Is it a Microsoft Word document?  Can you post a link to a sample?

Thanks

Bruce

Avatar

Level 2

The text that i copy is an example text, i try all method to copy/past the text "from text to textfield" or "from textfield to textfield" with "Rich Text" and the results is the same. This is the link to my sample: ExpireBox | NewForm1.xdp

Avatar

Level 10

Hi,

Seems we were talking about two different things, I thought you were using a text field but seems you are using a static text object.  So ignore all previous comments.

But you should still be able to paste rich text into a text object in the LiveCycle Designer design view.  I have updated your sample https://sites.google.com/site/livecycledesignercookbooks/home/NewForm1.updated.xdp?attredirects=0&d=...  with the text I have pasted from this Word document https://sites.google.com/site/livecycledesignercookbooks/home/FontSample.docx?attredirects=0&d=1

Still not sure I understand what you are trying to do.

Regards

Bruce

Avatar

Level 2

I'm so sorry, I was wrong sample template. This is the right example for my problem: ExpireBox | LIBERO.xdp

Sorry again and thanks for the help!

Avatar

Level 10

Hi,

Seems that file has 'expired' and is no longer available.

Can you upload it again.

Bruce

Avatar

Level 10

It seems that when you are copying static text from the PDF and pasting it into the text field the font size is being increased by something like 20%.  Is that the problem you are facing.  I must say I haven't come across it as the main copy/paste I've had to deal with is from MS Word, which does seem to work.  Even if you past from the PDF to a MS Word document it gets enlarged as well.

So, sorry to say after a couple of weeks I can't help.

Bruce

Avatar

Level 2

Thank you anyway for your commitment and support.