Explore the community Forums Lectora Lectora Questions & Answers Maintaining Margin (or paragraph spacing) in Dynamically Filled Text Boxes? Reply To: Maintaining Margin (or paragraph spacing) in Dynamically Filled Text Boxes?

#444319 Score: 1
Profile photo of John Holland
John Holland
picture perfect
friend finder
curious george
wise owl
Group Member
Trivantis Support
verified member
4 pts

Yes, text formatting like margins and paragraph spacing will get removed in a text object when you change the content. You can add an action after the content change that adjusts the styling using CSS and jQuery/javascript. I’ve added links at the bottom of this reply to some suggestions made by forum members.

If you don’t want to use CSS, you can use Lectora to achieve the same results by having two text boxes, one nested over the other. Have the larger box have the outline border you want, then size the inner box to be smaller with space between its outer border and the outline of the larger box. Have no border on this smaller text box. Have the text in the smaller box be the text you update. The text will stay within the inner text box. The outer text box could also be a rectangle with transparent fill and an outline border of your choice.

Styling of ChangeContent Text

Inline variable replacement …

Change Contents Text Box

This post has received 1 vote up.