Skip to main content


 

Symptoms
Rich Text control incorrectly saving/displaying blank new lines.
 

 

Diagnosis

 

The last empty new line typed in will save as '<div></div>' and not insert a non-breaking space or <br> tag. Saving and reloading the data results in inconsistent aesthetic.

Resolution

 

Workaround:
- Add a temporary Data Label to the Form/View
- Click on it, and open the Expression editor via its properties window (bottom right)
- Create a new expression named 'RichTextFix'
- Drag in an 'Operators -> Text -> Replace' function, filling its input in with the Rich Text control, <div></div>, and <br>, respectively.
- The preview should look like the following: Replace ( Rich Texts, <div></div>, <br> )
- Click OK twice
- In the SQL Create/Update rules that you are saving the data, drag the RichTextFix expression in, in place of the Rich Text Control value.
- You can delete the Data Label if you're done using the Expression editor

This will replace blank DIV tags with BR tags before saving, and should load the values as visually expected. You can repeat this process for however many Rich Text controls you have. Also, you can likely replace my <br> tag with <div>&nbps;</div> if you want to keep the SQL data looking consistent.

 

 

 

 

 

 



 
Be the first to reply!

Reply