web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dynamics 365 model dri...
Power Apps
Answered

Dynamics 365 model driven app richtextbox control disableContentSanitization configuration setting not working

(0) ShareShare
ReportReport
Posted on by 96

Hello experts,

In my case I would like to prevent users copy paste rich text content into a richtextbox field.

It is possible with using disableContentSanitization setting according to documentation (https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/rich-text-editor-control ), however no sanitization happens when I set disableContentSanitization to true or false either.

The following documentation is available for disableContentSanitization:

By default, content sanitization is disabled to allow successful copying and pasting of rich text content from external sources. When enabled, the content sanitization will remove some of the custom attributes or tags. This configuration applies only to edit mode. Read-only or disabled state rendering will always be sanitized.

I have a corresponding settings webresource file which is working fine for the field, if I delete

"showFullScreenExpander": true part from the statically binded config file for example, than the expander dissappears instantly on the control of the form after publish and refresh cache.

This is my not working settings file which is not working on 2 different environtments:

 

 

{
 "defaultSupportedProps": {
 "toolbarLocation":"top",
 "font_defaultLabel": "IBM Plex Sans",
 "fontSize_defaultLabel": "11",
 "stickyStyle": {
 
 "font-size": "11pt",
 
 "font-family": "'IBM Plex Sans','Helvetica Neue',sans-serif"
 
 },
	"toolbar":[["CopyFormatting"], ["Font"], ["FontSize"], ["Bold"], ["Italic"], ["Underline"], ["BGColor"], ["TextColor"], ["BulletedList"], ["NumberedList"], ["Outdent"], ["Indent"], ["Blockquote"], ["JustifyLeft"], ["JustifyCenter"], ["JustifyRight"], ["Link"], ["Unlink"], ["Subscript"], ["Superscript"], ["Strike"],["BidiLtr"], ["BidiRtl"], ["Undo"], ["Redo"], ["RemoveFormat"], ["Table"]]
 },
 
"showAsTabControl": true, "disableContentSanitization": false, "showFullScreenExpander": true , "showHtml": true ,"font_defaultLabel": "Georgia", "disableDefaultImageProcessing": true,
"font_names":"Brush Script MT/'Brush Script MT', cursive;Calibri/Calibri, Helvetica, sans-serif;Calibri Light/'Calibri Light', 'Helvetica Light', sans-serif;", "font_defaultLabel":"Brush Script MT", "fontSize_sizes":"8/8px;12/12px;20/20px;32/32px", "fontSize_defaultLabel":"20", "stickyStyle":{"font-size":"20px", "font-family":"'Brush Script MT', cursive"} 
}

 

 

The issue is reproducable this way:

apply this settings file on richtextbox control,

try insert an outlook signature which contains formatted texts and picture,

the copy paste operation will succed, no sanitization occures.

It is a bug, or disableContentSanitization settings can't sanitize out formatted texts?

I found no documentation or explanation on "the content sanitization will remove some of the custom attributes or tags" what means.

Can someone help me on this issue?

Categories:
I have the same question (0)
  • Verified answer
    rgx91 Profile Picture
    96 on at

    The solution is:
    "forcePasteAsPlainText": true

    in defaultSupportedProps settings collection.

    Source:
    https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard