Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Avoid pasting images in rich text editor (RTE)



Images to be pasted in RTE must be suppressed.

Error Messages

Not Applicable

Steps to Reproduce

1. Open a work object where RTE exists.
2. Paste HTML with images from Outlook or Word document.
3. Notice the images are pasted.

Root Cause

It is an expected behavior. In Pega 7.x implementation CKEditor is used, hence RTE is allowed to paste images. In PRPC 6.x, YUI editor is used, hence the image was suppressed while pasting into RTE.


Perform the following local-change:
Include the code below in USERWORKFORM (or create an non-auto generated section and use this section where images must not be pasted in RTE.)

if(window.CKEDITOR) {
for ( var ck_instance in window.CKEDITOR.instances ){
var cke=window.CKEDITOR.instances[ck_instance];
cke.on('paste', function(evt) {
if("<img")>-1) {
var count = (pData.match(/<img/g) || []).length;
var rImgText=pData.split("<img")[1].split(">")[0];

Published June 2, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community 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.

Close Deprecation Notice
Contact us