Prevent pasting images in Type=HTML fields

Saeka
Kilo Sage

Hello,

 

I noticed that pasting an image into a Type=HTML field causes it to be immediately posted as an image in the activity.

Since there's a risk of unintended images saved to the clipboard being posted, is there a way to prevent image pasting altogether?

4 REPLIES 4

Community Alums
Not applicable

@Saeka , This is expected behavior. When you paste an image into an HTML field, ServiceNow automatically attaches it and displays it in the activity stream.
If you want to disable image pasting, you can do so by adding a UI Script or onChange Client Script that blocks paste events for that field. 

Saeka
Kilo Sage

@Community Alums , Thank you for your response. Would it be possible for you to provide a specific script?

@Saeka did you find any solution to this?

 

@MohammedMoeiz , it's not resolved yet.