How to prevent Calculated Values from removing white space in strings

How to prevent Calculated Values from removing white space in strings

book

Article ID: KB0079380

calendar_today

Updated On:

Products Versions
Spotfire Analyst All Versions

Description

By default, a Calculated Value that displays a string with line breaks and other white space will have the white space removed. It is possible through styling in the Text Area to display the white space.

Issue/Introduction

How to prevent Calculated Values from removing white space in strings

Resolution

1). Right click on the Text Area which contains the Calculated Value and select "Edit HTML".  The Calculated Value dynamic item will be seen in the HTML like:
<SpotfireControl id="b8b61cbc93ee4821a069788b31042686" />

2). Wrap the SpotfireControl element with the following HTML:
    Before:
<pre style="white-space: pre-wrap;     
        white-space: -moz-pre-wrap; 
        white-space: -pre-wrap;    
        white-space: -o-pre-wrap;  
        word-wrap: break-word;">
       
    After:
</pre>

Example:
<pre style="white-space: pre-wrap;     
    white-space: -moz-pre-wrap; 
    white-space: -pre-wrap;    
    white-space: -o-pre-wrap;  
    word-wrap: break-word;"><SpotfireControl id="b8b61cbc93ee4821a069788b31042686" /></pre>

3). Click the "Save" icon.

Additional Information

Supported HTML in the Text Area