Add Max characters to RTE
I need to restrict the characters count (including image size) in Rich text editor. How to achieve this?
I need to restrict the characters count (including image size) in Rich text editor. How to achieve this?
@ThivyaGR Rich Text Editor input including images. First decide a single limit, either in characters or total bytes. RTE stores HTML, so just counting visible letters is not enough. Add a Validate rule on the submit step that reads the RTE property value and calculates a total. In that validator, parse the HTML to find all img tags. If an image is embedded as a data URI, estimate its bytes from the base64 length. If an image points to an attachment, look up the file size on the linked attachment record and add it. Then add the HTML string length for the text part, or strip tags and count characters if you prefer that rule. If the total is over your limit, set a message on the RTE property to stop submission and tell the user the max allowed. In Constellation rely on this server side check and show a helper note about the limit, while in Section based UI you can also add a client change action to warn as they type.
Question Solved
Question
Question
Discussion
Question Solved
Question Solved
Question Solved
Question
Question
Question Solved
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.