HTML Sanitizer - I want to remove Font sizing (Blocks?) from SP HTML field types.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 09:18 AM
We want our submitters to use the SP to submit formatted text with the ability to use bulleted items and CRs - hence HTML field types in the Catalog Items.
However, I do NOT want subitters to be able to change the Heading Size or the font type.
While we have a complicated catalog script like
var elem2 = doc.querySelectorAll('[aria-label="Fonts"]');
if (elem2.length > 0) {
elem2.forEach(function(elem) {
elem.style.display = "none";
});
I am hopeful to use the global blacklist from HTML Sanitizer.
However, I am not able to get the blacklist to apply. I am not even sure if it does apply.
HTML sanitizer for translated HTML fields, set the glide.translated_html.sanitize_all_fields property is true.
Within the Script Include
HtmlSanitizerConfig
I have under blacklist
HTML_BLACKLIST : {
globalAttributes: {
attribute:["Insert image","Fonts","Blocks","H1",aria-label="Fonts"],}
},
Any insight on this feature?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 01:47 PM
So far none of this has worked...
Is it based on HTML or is it something that is set like I have previously?