el-text-editor 0.0.5 → 0.0.6
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.
@@ -202,7 +202,11 @@ class ElTextEditorComponent {
|
|
202
202
|
}
|
203
203
|
addClickListenerToImages() {
|
204
204
|
const editor = document.getElementById('editor');
|
205
|
-
|
205
|
+
const roles = this.roleCheck(); // Get user roles dynamically
|
206
|
+
const isAdmin = roles.includes('Admin');
|
207
|
+
const isCreator = roles.includes('Creator');
|
208
|
+
const isApprover = roles.includes('Approver');
|
209
|
+
if (isCreator || isAdmin) {
|
206
210
|
if (editor) {
|
207
211
|
editor.addEventListener('click', (event) => {
|
208
212
|
var _a;
|