How to stop JSON code from appearing in the display of a list

Maria Z 0 Reputation points
2024-12-17T01:29:23.31+00:00

I have a Sharepoint List that has a multiple line text field. I wanted the size of the text of the field to display as 9pt, so I included the below JSON code. Unfortunately the JSON code is displaying with the column entry. Is there any way I can default the font size to 9 and not use the JSON? If not, how can I make it so the code is not displayed (see image)

JSON code

{

"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",

"elmType": "div",

"debugMode": true,

"txtContent": "@currentField",

"style": {

"font-size": "9pt"

}

}

This is what appears in the view of the list for that column

User's image

This is what appears in the data entry for that field. I just want the 11pt to be 9pt

User's image

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,154 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 37,151 Reputation points Microsoft Vendor
    2024-12-17T07:22:53.3266667+00:00

    Hi @Maria Z

    Per my test, I could reproduce your issue with User enhanced rich text and Append changes to existing text enabled

    User's image

    After disable the two option, I could run the json code as expected. Please check these options in column edit.

    User's image


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Maria Z 0 Reputation points
    2024-12-17T22:22:36.8433333+00:00

    Thank you for your response. Unfortunately, changing those settings did not work. Ideally, I would like to be able to define the font size somewhere in the settings so it always defaults to the value I would like without using JSON if possible.

    I really appreciate your assistance.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.