@festo-ui/angular 4.0.3-pre-20221010.2 → 4.0.3-pre-20221026.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5661,6 +5661,11 @@ class TextEditorComponent extends ValueAccessorBaseDirective {
5661
5661
  orderedList: true,
5662
5662
  image: true,
5663
5663
  link: true
5664
+ },
5665
+ sanitizing: {
5666
+ sanitizingFn: null,
5667
+ skipDefaultSanitizing: false,
5668
+ skipWhitespaceHandling: false
5664
5669
  }
5665
5670
  };
5666
5671
  this.fngChange = new EventEmitter();
@@ -5676,8 +5681,16 @@ class TextEditorComponent extends ValueAccessorBaseDirective {
5676
5681
  };
5677
5682
  // needed to access editor content
5678
5683
  this.valueSetter = (quillEditor, value) => {
5679
- value = this.domSanitizer.sanitize(SecurityContext.HTML, value);
5680
- value = this.handleWhitespace(value);
5684
+ const sanitizeConfig = this.config?.sanitizing || this.defaultConfig.sanitizing;
5685
+ if (sanitizeConfig.sanitizingFn) {
5686
+ value = sanitizeConfig.sanitizingFn(this.domSanitizer);
5687
+ }
5688
+ if (!sanitizeConfig.skipDefaultSanitizing) {
5689
+ value = this.domSanitizer.sanitize(SecurityContext.HTML, value);
5690
+ }
5691
+ if (!sanitizeConfig.skipWhitespaceHandling) {
5692
+ value = this.handleWhitespace(value);
5693
+ }
5681
5694
  return quillEditor.clipboard.convert(value);
5682
5695
  };
5683
5696
  }