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?

Report
All responses (
Answers (