SOLVED

HTML Column Formatting

Copper Contributor

I'm very confused on something right now...I can set the Column to be Rich Text Formatting and it allows me to make things bold, colors, etc.

 

However, once it is shown in the list it is NOT formatted the same way...how can I fix this?

Example below:

 

2023-01-23_13-32-44.png

4 Replies
best response confirmed by smithmrk (Copper Contributor)
Solution

Hi @smithmrk,

did you apply a JSON formatting stylesheet on that column?

I get the same effect, if i create a new "Multiple lines of text" column, switch it to "Use enhanced rich text" and then i.e. apply this template

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "=@currentField"
}

 
If so, then try to remove that formatting sheet.

Best Regards,
Sven

@SvenSieverding 

I removed the formatting as you suggested and that worked...however is there a way to show all the text in the field? If you look at my screen shot...I have the field next to it showing all the text, but it is cutting off my Description field.

 

2023-01-24_14-56-55.png

Hi @smithmrk,

mhm...
you could try to go into "Gear"->"List Settings"->"<Your Column>" and increase the number of lines for editing.

NumberOfLinesEditing.png


Has the other approval column any formatting? Are your "Description" column and the "Approval" column defined identically? Or is that not a multiline textfield?

Best Regards,
Sven

Thanks for the suggestion...but that didn't work.
YES, the Approval History Column has JSON formatting to expand the column view. However, for the description column, because we had to remove the JSON to show Rich Text format, it won't let me use that to expand the column.

The Approval History JSON looks like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"white-space": "normal",
"padding": "11px 0"
}
}

I guess I can't have the best of both worlds.
Mark
1 best response

Accepted Solutions
best response confirmed by smithmrk (Copper Contributor)
Solution

Hi @smithmrk,

did you apply a JSON formatting stylesheet on that column?

I get the same effect, if i create a new "Multiple lines of text" column, switch it to "Use enhanced rich text" and then i.e. apply this template

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "=@currentField"
}

 
If so, then try to remove that formatting sheet.

Best Regards,
Sven

View solution in original post