# HMTL text formatting doesn't work if power table cell is word wrapped

**URL:** <https://forum.inductiveautomation.com/t/hmtl-text-formatting-doesnt-work-if-power-table-cell-is-word-wrapped/71558>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [March 24, 2023, 3:23pm UTC](https://forum.inductiveautomation.com/t/hmtl-text-formatting-doesnt-work-if-power-table-cell-is-word-wrapped/71558 "2023-03-24T15:23:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stuart.williams](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stuart.williams/32/42310_2.png) [@stuart.williams](https://forum.inductiveautomation.com/u/stuart.williams)\
**Post date:** [March 24, 2023, 3:23pm UTC](https://forum.inductiveautomation.com/t/hmtl-text-formatting-doesnt-work-if-power-table-cell-is-word-wrapped/71558/1 "2023-03-24T15:23:45Z")

</div>

Background : [previous forum post](https://forum.inductiveautomation.com/t/format-specific-text-in-power-table-cell/71521/2)

I've got a table that shows user-entered and system-generated notes associated with a downtime event. Client's requested to make system-generated text bold and leave user-entered text non-formatted for easy distinction. Using html tags show up in plain text due to word wrap being enabled on the cell.

Is this a "one or the other" type scenario or is there something I can do to have the best of both worlds.  
Thanks

Screenshot:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/0/a0b8ae70c29d758ecccc72b3b14b375d08a70917.png)

Ignition 8.1.24, Vision

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 24, 2023, 4:13pm UTC](https://forum.inductiveautomation.com/t/hmtl-text-formatting-doesnt-work-if-power-table-cell-is-word-wrapped/71558/2 "2023-03-24T16:13:14Z")

</div>

This is not the most efficient implementation (the renderer should be created and cached in `initialize`), but it proves the concept:

```python
def configureCell(self, value, textValue, selected, rowIndex, colIndex, colName, rowView, colView):
	if colName == "String Column":
		from com.jidesoft.grid import StyledTableCellRenderer
		from com.jidesoft.swing import StyledLabelBuilder
		
		renderer = StyledTableCellRenderer()
		StyledLabelBuilder.setStyledText(renderer, textValue)
		renderer.lineWrap = True
		return {'renderer': renderer}

```

StyledLabel/StyledTableCellRenderer support their own special markup format:

> **[StyledLabel.pdf](https://www.jidesoft.com/articles/StyledLabel.pdf)**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9b0d34e7dba0f81de77a1da6c306d7e2f84bb7b0.png)

---

<div class="post-metadata">

**Author:** ![stuart.williams](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stuart.williams/32/42310_2.png) [@stuart.williams](https://forum.inductiveautomation.com/u/stuart.williams)\
**Post date:** [March 24, 2023, 4:35pm UTC](https://forum.inductiveautomation.com/t/hmtl-text-formatting-doesnt-work-if-power-table-cell-is-word-wrapped/71558/3 "2023-03-24T16:35:19Z")

</div>

Thanks, I'll mess around with this
