Quellcode durchsuchen

[ignore-changes] attr for note-rte elements

Vijayakrishnan vor 3 Jahren
Ursprung
Commit
1306f8b60b

+ 6 - 2
resources/views/app/patient/wizard-partials/common-script.blade.php

@@ -62,7 +62,9 @@ function __initRTEs(_collection) {
             pElem.find('input[name=data]').val(v);
         };
 
-        quill.on('text-change', onTextChange);
+        if(!noteRTE.is('[ignore-changes]')) {
+            quill.on('text-change', onTextChange);
+        }
 
         $(quill.container)
             .find('.ql-editor[contenteditable]')
@@ -71,7 +73,9 @@ function __initRTEs(_collection) {
             .attr('with-shortcuts', 1);
 
         // set value initially
-        onTextChange();
+        if(!noteRTE.is('[ignore-changes]')) {
+            onTextChange();
+        }
     });
 }