Smartforms - HTML Literal Data Labels adds extra Line Space
kbt156077
PRODUCTK2 Cloud
K2 Five
K2 blackpearl 4.6.10 to 4.7
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
Issue
When passing HTML into a Rich Text control with the Literal setting configured, there is an extra line space that is added.Symptoms
The issue is due ot how the Rich Text control parses HTML. The extra line space is added similar to below.
This is Line 1
This is Line 2
This is Line 3
Resolution
Nest the <div> tags in a <div> tag with "white-space: nowrap;" styling it will remove the extra white space and get rid of the extra lines.
Example:
<div style="white-space: nowrap;">
<div><em>this is line item 1</em></div>
<div>this is line item 2</div>
<div><strong>this is line item 1</strong></div>
</div>
<div><em>this is line item 1</em></div>
<div>this is line item 2</div>
<div><strong>this is line item 1</strong></div>
</div>