croco-html 4.3.2 → 4.3.3

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.
@@ -1018,15 +1018,15 @@ class BodyTagsExtensions {
1018
1018
  }
1019
1019
  return options.definedCustomTags[tagName];
1020
1020
  }
1021
- static convertToHtmlString(bodyTag) {
1021
+ static convertToHtmlString(bodyTag, options) {
1022
1022
  const tagName = bodyTag.tagDescription.tag;
1023
- if (this.tagServices.hasOwnProperty(tagName)) {
1024
- return this.tagServices[tagName].bodyTagToHtmlStringConverter(bodyTag);
1023
+ if (this.hasTagService(tagName, options)) {
1024
+ return this.getTagService(tagName, options).bodyTagToHtmlStringConverter(bodyTag);
1025
1025
  }
1026
1026
  return `<mapper-not-found>"${bodyTag.tagDescription.tag}" тег не найден.</mapper-not-found>`;
1027
1027
  }
1028
- static bodyTagsToHtml(bodyTags) {
1029
- let htmls = bodyTags.map(bodyTag => (BodyTagsExtensions.convertToHtmlString(bodyTag)));
1028
+ static bodyTagsToHtml(bodyTags, options) {
1029
+ let htmls = bodyTags.map(bodyTag => (BodyTagsExtensions.convertToHtmlString(bodyTag, options)));
1030
1030
  let result = "";
1031
1031
  for (let index = 0; index < htmls.length; index++) {
1032
1032
  const element = htmls[index];
@@ -2460,7 +2460,7 @@ class VisualEditorComponent {
2460
2460
  this.recalculateHtml();
2461
2461
  }
2462
2462
  recalculateHtml() {
2463
- let result = BodyTagsExtensions.bodyTagsToHtml(this.bodyTags);
2463
+ let result = BodyTagsExtensions.bodyTagsToHtml(this.bodyTags, this._options);
2464
2464
  this.html = XmlExtensions.formatXml("<body>" + result + "</body>");
2465
2465
  this.onHtmlChanged.emit(this.html);
2466
2466
  }