Markdown options for read-only text
Enable markdown formatting for ReadOnlyText components in ServiceNow CPQ layouts to enhance text presentation. Use syntax for bold, italics, lists, links, images, and dynamic field values to create clear, engaging, and context-aware display text in configurations.
This article describes the markdown syntax and behaviors available to administrators when a text field is defined on a native ServiceNow CPQ UI layout with component display type ReadOnlyText. For a broader discussion of layout options, see CSV layout upload.
To apply markdown formatting to a ReadOnlyText component:
- In the layout editor, open the field properties (button with cog icon)
- Add the following as the raw value:
{ "enableMarkdown": true } - Use the following markdown syntax in the text field value.
|
Formatting Option |
Syntax |
Output |
Notes | ||||||
|---|---|---|---|---|---|---|---|---|---|
|
Bold |
**this will be bold** |
bold text |
A double underscore instead of the double * will also work | ||||||
|
Italics |
*this will be italic* _this will be italic_ |
italic text |
A single underscore instead of the single * will also work | ||||||
|
Unordered List |
Item\r- Item\r- Item |
|
| ||||||
|
Ordered List |
1.Item\r2. Item\r3. Item |
|
| ||||||
|
Newline |
\n |
|
| ||||||
|
Link |
[link display text] (https://www.example.com) |
Any JavaScript entered will be sanitized | |||||||
|
Image |
 |
N/A |
| ||||||
|
Table |
| Header1 | Header2 |\n|---|---|\n| Row1Col1 | Row1Col2 |\n| Row2Col1 | Row2Col2 | |
|
By default, columns are left-aligned. To right-align, use By default, table borders are off. To add borders, add theme property | ||||||
|
Dynamic Text |
{{fieldVariableName}} |
|
Outputs the value of the selected field in the text | ||||||
|
Dynamic Non- Field Text |
{{txn#rowNumber}} |
|
Outputs the value of the dynamic text based on context Currently, only rowNumber in a txn line is supported |
Returning strings with Markdown
When you return a string with Markdown, enclose the string in double quotes, especially when using escaped characters such as \n for line breaks. Using single quotes may prevent Markdown from rendering properly and can lead to unexpected results.
For example, when the following return function is entered, it leads to the escaped characters appearing in the output:
[Omitted image "cpq-layout-markdown-options-1.png"] Alt text: Incorrect use of single quotes
[Omitted image "cpq-layout-markdown-options-2.png"] Alt text: Bad string appearing as a result of single quotes
When the return function encloses the same text in double quotes, the output appears as intended:
[Omitted image "cpq-layout-markdown-options-3.png"] Alt text: Correct use of double quotes
[Omitted image "cpq-layout-markdown-options-4.png"] Alt text: Appropriate string appearing as a result of double quotes
---
title: Markdown options for read-only text
description: Enable markdown formatting for ReadOnlyText components in ServiceNow CPQ layouts to enhance text presentation. Use syntax for bold, italics, lists, links, images, and dynamic field values to create clear, engaging, and context-aware display text in configurations.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/australia/order-management/layout\_readonlytext\_markdown\_options.html
release: australia
topic_type: reference
last_updated: "2026-03-12"
reading_time_minutes: 2
breadcrumb: [Enable Markdown in text fields, Configure fields, ServiceNow CPQ Configurator, Configure, price, quote apps, Configure, Sales Customer Relationship Management]
---
# Markdown options for read-only text
Enable markdown formatting for ReadOnlyText components in ServiceNow CPQ layouts to enhance text presentation. Use syntax for bold, italics, lists, links, images, and dynamic field values to create clear, engaging, and context-aware display text in configurations.
This article describes the markdown syntax and behaviors available to administrators when a text field is defined on a native ServiceNow CPQ UI layout with component display type ReadOnlyText. For a broader discussion of layout options, see [CSV layout upload](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/order-management/csv_layout_upload.md).
To apply markdown formatting to a ReadOnlyText component:
1. In the layout editor, open the field properties \(button with cog icon\)
2. Add the following as the raw value: `{ "enableMarkdown": true }`
3. Use the following markdown syntax in the text field value.
<table><thead><tr><th>
Formatting Option
</th><th>
Syntax
</th><th>
Output
</th><th>
Notes
</th></tr></thead><tbody><tr><td>
Bold
</td><td>
\*\*this will be bold\*\*
</td><td>
**bold text**
</td><td>
A double underscore instead of the double \* will also work
</td></tr><tr><td>
Italics
</td><td>
\*this will be italic\*
\_this will be italic\_
</td><td>
*italic text*
</td><td>
A single underscore instead of the single \* will also work
</td></tr><tr><td>
Unordered List
</td><td>
Item\\r- Item\\r- Item
</td><td>
- Item
- Item
- Item
</td><td>
</td></tr><tr><td>
Ordered List
</td><td>
1.Item\\r2. Item\\r3. Item
</td><td>
1. Item
2. Item
3. Item
</td><td>
</td></tr><tr><td>
Newline
</td><td>
\\n
</td><td>
</td><td>
</td></tr><tr><td>
Link
</td><td>
\[link display text\] \(https://www.example.com\)
</td><td>
[link display text](https://www.example.com)
</td><td>
Any JavaScript entered will be sanitized
</td></tr><tr><td>
Image
</td><td>
!\[alt text\]\(image url, "title text"\)
</td><td>
N/A
</td><td>
</td></tr><tr><td>
Table
</td><td>
\| Header1 \| Header2 \|\\n\|---\|---\|\\n\| Row1Col1 \| Row1Col2 \|\\n\| Row2Col1 \| Row2Col2 \|
</td><td>
|Header1|Header2|
|-------|-------|
|Row1Col1|Row1Col2|
|Row2Col1|Row2Col2|
</td><td>
By default, columns are left-aligned. To right-align, use `---:`. To center, use `:---:`.
By default, table borders are off. To add borders, add theme property `Markdown-table-borderWidth: 1px`.
</td></tr><tr><td>
Dynamic Text
</td><td>
\{\{fieldVariableName\}\}
</td><td>
</td><td>
Outputs the value of the selected field in the text
</td></tr><tr><td>
Dynamic Non- Field Text
</td><td>
\{\{txn\#rowNumber\}\}
</td><td>
</td><td>
Outputs the value of the dynamic text based on context
Currently, only rowNumber in a txn line is supported
</td></tr></tbody>
</table>This markdown syntax is the same as that available for field help popups.
## Returning strings with Markdown
When you return a string with Markdown, enclose the string in double quotes, especially when using escaped characters such as `\n` for line breaks. Using single quotes may prevent Markdown from rendering properly and can lead to unexpected results.
For example, when the following return function is entered, it leads to the escaped characters appearing in the output:
\[Omitted image "cpq-layout-markdown-options-1.png"\] Alt text: Incorrect use of single quotes
\[Omitted image "cpq-layout-markdown-options-2.png"\] Alt text: Bad string appearing as a result of single quotes
When the return function encloses the same text in double quotes, the output appears as intended:
\[Omitted image "cpq-layout-markdown-options-3.png"\] Alt text: Correct use of double quotes
\[Omitted image "cpq-layout-markdown-options-4.png"\] Alt text: Appropriate string appearing as a result of double quotes
| title | Markdown options for read-only text |
| description | Enable markdown formatting for ReadOnlyText components in ServiceNow CPQ layouts to enhance text presentation. Use syntax for bold, italics, lists, links, images, and dynamic field values to create clear, engaging, and context-aware display text in configurations. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/order-management/layout\_readonlytext\_markdown\_options.html |
| release | australia |
| topic_type | reference |
| last_updated | 2026-03-12 |
| reading_time_minutes | 2 |
| breadcrumb | Enable Markdown in text fieldsConfigure fieldsServiceNow CPQ ConfiguratorConfigurepricequote appsConfigureSales Customer Relationship Management |