el-text-editor 0.0.38 → 0.0.39
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/esm2020/lib/el-text-editor.component.mjs +13 -1
- package/fesm2015/el-text-editor.mjs +12 -0
- package/fesm2015/el-text-editor.mjs.map +1 -1
- package/fesm2020/el-text-editor.mjs +12 -0
- package/fesm2020/el-text-editor.mjs.map +1 -1
- package/lib/el-text-editor.component.d.ts +2 -0
- package/package.json +1 -1
@@ -81,6 +81,13 @@ class ElTextEditorComponent {
|
|
81
81
|
this.isFullScreen = false;
|
82
82
|
this.userRole = [];
|
83
83
|
this.IsOpen = false;
|
84
|
+
this.onFullscreenChange = () => {
|
85
|
+
if (!document.fullscreenElement) {
|
86
|
+
// When fullscreen mode is exited
|
87
|
+
this.IsOpen = false;
|
88
|
+
this.isOpen.emit(this.IsOpen);
|
89
|
+
}
|
90
|
+
};
|
84
91
|
this.getUserRoles();
|
85
92
|
}
|
86
93
|
themeMode() {
|
@@ -143,6 +150,7 @@ class ElTextEditorComponent {
|
|
143
150
|
this.initEditor();
|
144
151
|
this.checkPlaceholder();
|
145
152
|
this.setupHistory();
|
153
|
+
document.addEventListener('fullscreenchange', this.onFullscreenChange);
|
146
154
|
}
|
147
155
|
ngOnInit() {
|
148
156
|
this.init_Func(this.editorText);
|
@@ -163,6 +171,10 @@ class ElTextEditorComponent {
|
|
163
171
|
// }
|
164
172
|
// })
|
165
173
|
}
|
174
|
+
ngOnDestroy() {
|
175
|
+
// Cleanup the event listener when the component is destroyed
|
176
|
+
document.removeEventListener('fullscreenchange', this.onFullscreenChange);
|
177
|
+
}
|
166
178
|
toggleFullscreen1() {
|
167
179
|
this.IsOpen = !this.IsOpen;
|
168
180
|
this.isOpen.emit(this.IsOpen);
|