소스 검색

[ignore-changes] attr for note-rte elements

Vijayakrishnan 3 년 전
부모
커밋
1306f8b60b
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      resources/views/app/patient/wizard-partials/common-script.blade.php

+ 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();
+        }
     });
 }