Open mostopalove opened 2 years ago
Hello,
I found a way to do that. I don't know if it's the better but it works :)
You have to change your options settings to whitelist mat-icon tags and properties and use the final form of mat-icon tag in your content item :
add in options :
xss: {
disabled: false,
filterOptions: {
whiteList: {
"mat-icon": ['role', 'class', 'aria-hidden', 'data-mat-icon-type'],
},
},
}
in content item :
<mat-icon role="img" class="mat-icon notranslate material-icons mat-ligature-font mat-icon-no-color" aria-hidden="true" data-mat-icon-type="font">build</mat-icon>
Hope it works for you !
I tried to use material design icons but it doesn't work. https://codepen.io/mostopalove/pen/LYyzMNw
How to set html content for item with classes?