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