croco-html 4.3.3 → 4.3.4
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.
- package/fesm2022/croco-html.mjs +6 -5
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/index.d.ts +2 -2
- package/package.json +1 -1
package/fesm2022/croco-html.mjs
CHANGED
|
@@ -269,9 +269,9 @@ class FileImageTagService {
|
|
|
269
269
|
fileIdAttr = `${FileImageTagDataConsts.FileIdAttrName}="${bodyTag.attributes[FileImageTagDataConsts.FileIdAttrName]}"`;
|
|
270
270
|
}
|
|
271
271
|
if (bodyTag.attributes.hasOwnProperty(FileImageTagDataConsts.ScreenMediaRequest) && bodyTag.attributes[FileImageTagDataConsts.ScreenMediaRequest]) {
|
|
272
|
-
screenMediaRequestAttr =
|
|
272
|
+
screenMediaRequestAttr = ` ${FileImageTagDataConsts.ScreenMediaRequest}="${bodyTag.attributes[FileImageTagDataConsts.ScreenMediaRequest]}"`;
|
|
273
273
|
}
|
|
274
|
-
return `<${FileImageTagDataConsts.TagName} ${fileIdAttr}
|
|
274
|
+
return `<${FileImageTagDataConsts.TagName} ${fileIdAttr}${screenMediaRequestAttr}></${FileImageTagDataConsts.TagName}>`;
|
|
275
275
|
}
|
|
276
276
|
extractBlockFromHtmlElement(elem, options) {
|
|
277
277
|
let fileId = elem.getAttribute(FileImageTagDataConsts.FileIdAttrName);
|
|
@@ -1019,11 +1019,12 @@ class BodyTagsExtensions {
|
|
|
1019
1019
|
return options.definedCustomTags[tagName];
|
|
1020
1020
|
}
|
|
1021
1021
|
static convertToHtmlString(bodyTag, options) {
|
|
1022
|
-
const tagName = bodyTag.tagDescription.tag;
|
|
1022
|
+
const tagName = bodyTag.tagDescription.tag.toLowerCase();
|
|
1023
1023
|
if (this.hasTagService(tagName, options)) {
|
|
1024
1024
|
return this.getTagService(tagName, options).bodyTagToHtmlStringConverter(bodyTag);
|
|
1025
1025
|
}
|
|
1026
|
-
|
|
1026
|
+
console.log("convertToHtmlString", bodyTag, options);
|
|
1027
|
+
return `<mapper-not-found>"${tagName}" тег не найден.</mapper-not-found>`;
|
|
1027
1028
|
}
|
|
1028
1029
|
static bodyTagsToHtml(bodyTags, options) {
|
|
1029
1030
|
let htmls = bodyTags.map(bodyTag => (BodyTagsExtensions.convertToHtmlString(bodyTag, options)));
|
|
@@ -2281,7 +2282,7 @@ class MainEditorBlockComponent {
|
|
|
2281
2282
|
this.onTagSaved.emit(this.tag);
|
|
2282
2283
|
}
|
|
2283
2284
|
isDefinedCustomTag() {
|
|
2284
|
-
console.log("isDefinedCustomTag()", this._options);
|
|
2285
|
+
console.log("isDefinedCustomTag()", this.tag, this._options);
|
|
2285
2286
|
if (this._options.definedCustomTags.hasOwnProperty(this.tag.tagDescription.tag)) {
|
|
2286
2287
|
return true;
|
|
2287
2288
|
}
|