How to Add HTML tag containing property to Paragraph
I have complete HTML code on a property as provided in the SS.
I want that code to display correct output in a paragraph rule.
is there any way to achieve this?
I have complete HTML code on a property as provided in the SS.
I want that code to display correct output in a paragraph rule.
is there any way to achieve this?
If you need to set the value of paragraph rule in a property, instead of paragraph rule use an HTML rule type and set it in the property using the Property-Set-HTML method.
Hi @SohamM95,
so, if I use Property-Set-HTML does it show the output of the HTML instead of complete code?
I have added the Property containing HTML to a paragraph using RichTextDisplay Format but i got it like the Screen Shot i have attached.
Oh you're using it to send email? Then you can add the paragraph into a correspondence rule. Then in a activity, use property-set-corr to set the value into a property, then call SendEmailNotification activity on the next step and add the property in the Message param of activity along with the other required params. Remember to check the HTMLmessage checkbox in the param list of the activity.
In Pega, HTML stored in a property will not render correctly if directly used in Paragraph or Rich Text fields. To render HTML in a Paragraph rule, use <pega:reference name=".PropertyName" mode="literal"/>. This allows the content to be treated as literal HTML instead of escaped text. For UI rendering, you can also use a custom control in a Section that writes the HTML directly. In email notifications, directly inserting the property might show raw HTML code. To fix this, use the Property-Set-HTML method before sending the email. This ensures the property is recognized as HTML during email generation. Then reference the property in the Correspondence rule body. This approach works for both email rendering and UI display of HTML content.
@B Anurag To display HTML content stored in a property inside a Paragraph rule in Pega, you can use the @HtmlEncode()
function to safely embed the property and avoid breaking the HTML structure. However, if your goal is to render the HTML as actual content (not as plain text), Paragraph rules do not directly support rendering dynamic HTML stored in a property. Instead, you can embed the property in a section using a Rich Text Editor (RTE)
or a Read-only Text
control with the display type set to “Rich Text.” This will render the HTML content properly. Ensure that the property type is Text
(not TextArea) and that "Allow HTML" is enabled in the control settings. Paragraph rules are mainly used for static content, so dynamic HTML rendering is best handled through section rules.
Question
Question Solved
Question
Question
Question Solved
Question Solved
Question
Question
Question
Question
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.