croco-html 20.3.1 → 20.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.
- package/fesm2022/croco-html.mjs +6 -2
- package/fesm2022/croco-html.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/fesm2022/croco-html.mjs
CHANGED
|
@@ -2738,6 +2738,9 @@ class DefaultTags {
|
|
|
2738
2738
|
return DefaultTags.tagRenderers.hasOwnProperty(item.tagName);
|
|
2739
2739
|
}
|
|
2740
2740
|
static isEditorDefined(tag, options) {
|
|
2741
|
+
if (tag === null || tag === undefined) {
|
|
2742
|
+
return false;
|
|
2743
|
+
}
|
|
2741
2744
|
const tagName = tag.tagDescription.tag;
|
|
2742
2745
|
if (options.definedEditorViewRenderers.hasOwnProperty(tagName)) {
|
|
2743
2746
|
return true;
|
|
@@ -3413,6 +3416,7 @@ class MainEditorBlockComponent {
|
|
|
3413
3416
|
this.textTags = TextTags.allTextTags;
|
|
3414
3417
|
this.unsubscribe = new Subject();
|
|
3415
3418
|
this._cdr = inject(ChangeDetectorRef);
|
|
3419
|
+
this._tag = null;
|
|
3416
3420
|
this.presentOrEdit = true;
|
|
3417
3421
|
this.onTagSaved = new EventEmitter();
|
|
3418
3422
|
this.onTagRemoved = new EventEmitter();
|
|
@@ -3426,10 +3430,10 @@ class MainEditorBlockComponent {
|
|
|
3426
3430
|
this._tagService.presentOrEdit$.next(false);
|
|
3427
3431
|
}
|
|
3428
3432
|
isEditorDefined() {
|
|
3429
|
-
return DefaultTags.isEditorDefined(this.
|
|
3433
|
+
return DefaultTags.isEditorDefined(this._tag, this._options);
|
|
3430
3434
|
}
|
|
3431
3435
|
deleteItem() {
|
|
3432
|
-
this.onTagRemoved.emit(this.
|
|
3436
|
+
this.onTagRemoved.emit(this._tag);
|
|
3433
3437
|
}
|
|
3434
3438
|
ngOnDestroy() {
|
|
3435
3439
|
this.unsubscribe.next();
|