Răsfoiți Sursa

RTE support for all note sections

Vijayakrishnan Krishnan 4 ani în urmă
părinte
comite
fb482eaa2a
41 a modificat fișierele cu 145 adăugiri și 45 ștergeri
  1. 19 1
      public/css/style.css
  2. 13 5
      public/js/shortcut.js
  3. 72 1
      resources/views/app/patient/note/dashboard.blade.php
  4. 1 1
      storage/sections/allergies/form.blade.php
  5. 1 1
      storage/sections/articulation/form.blade.php
  6. 1 1
      storage/sections/assessment/form.blade.php
  7. 1 1
      storage/sections/cc/form.blade.php
  8. 1 1
      storage/sections/current-goals/form.blade.php
  9. 1 1
      storage/sections/dsm-5/form.blade.php
  10. 1 1
      storage/sections/fhx/form.blade.php
  11. 1 1
      storage/sections/fluency/form.blade.php
  12. 1 1
      storage/sections/goals/form.blade.php
  13. 1 1
      storage/sections/health-concerns/form.blade.php
  14. 1 1
      storage/sections/history/form.blade.php
  15. 1 1
      storage/sections/hospitalizations/form.blade.php
  16. 1 1
      storage/sections/implantable-devices/form.blade.php
  17. 1 1
      storage/sections/impression/form.blade.php
  18. 1 1
      storage/sections/medication/form.blade.php
  19. 1 1
      storage/sections/mental-functional/form.blade.php
  20. 1 1
      storage/sections/minor-procedures/form.blade.php
  21. 1 1
      storage/sections/mse/form.blade.php
  22. 1 1
      storage/sections/objective-speech-language/form.blade.php
  23. 1 1
      storage/sections/objective/form.blade.php
  24. 1 1
      storage/sections/oral-mechanism-exam/form.blade.php
  25. 1 1
      storage/sections/plan/form.blade.php
  26. 1 1
      storage/sections/pmhx/form.blade.php
  27. 1 1
      storage/sections/pragmatics/form.blade.php
  28. 1 1
      storage/sections/pshx/form.blade.php
  29. 1 1
      storage/sections/psych-impression/form.blade.php
  30. 1 1
      storage/sections/psychfhx/form.blade.php
  31. 1 1
      storage/sections/psychhx/form.blade.php
  32. 1 1
      storage/sections/psychshx/form.blade.php
  33. 1 1
      storage/sections/receptive-expressive-language/form.blade.php
  34. 1 1
      storage/sections/results/form.blade.php
  35. 1 1
      storage/sections/ros/form.blade.php
  36. 1 1
      storage/sections/sochx/form.blade.php
  37. 1 1
      storage/sections/speech-development/form.blade.php
  38. 4 1
      storage/sections/subjective/form.blade.php
  39. 1 1
      storage/sections/tests/form.blade.php
  40. 1 1
      storage/sections/vitals/form.blade.php
  41. 1 1
      storage/sections/voice/form.blade.php

+ 19 - 1
public/css/style.css

@@ -229,7 +229,7 @@ body>nav.navbar {
     border-right: 0;
 }
 .mcp-theme-1 .ql-editor[contenteditable] {
-    min-height: 280px;
+    min-height: 100px;
 }
 .ql-container p {
     margin-top: 1rem;
@@ -244,6 +244,24 @@ body>nav.navbar {
     margin-left: -1.25rem;
     margin-right: -1.25rem;
 }
+.mcp-theme-1 .ql-toolbar .ql-formats * {
+    font-size: 12px !important;
+}
+.mcp-theme-1 .ql-toolbar.ql-snow {
+    padding: 3px;
+    background: #f7f7f7;
+}
+.mcp-theme-1 .ql-snow .ql-picker {
+    height: 22px;
+}
+.mcp-theme-1 .ql-snow.ql-toolbar button {
+    height: 22px;
+    width: 26px;
+}
+.rte-holder .ql-container p {
+    margin-top: 0;
+    margin-bottom: 1rem;
+}
 
 .note-section:not(.edit) .if-not-edit {
     display: block !important;

+ 13 - 5
public/js/shortcut.js

@@ -84,7 +84,7 @@
     }
     function apply() {
         if(input && options && options.length && index >= 0 && index < options.length) {
-            $(input).focus();
+            // $(input).focus();
             if(backtrackAfterApplying) {
                 document.execCommand("delete", true, null);
             }
@@ -133,7 +133,7 @@
                 let consumed = false;
                 switch(_e.which) {
                     case 32:
-                        if(_e.ctrlKey) {
+                        if(_e.ctrlKey && !isVisible()) {
                             backtrackAfterApplying = false;
                             show(this);
                             return false;
@@ -173,8 +173,8 @@
                 if(consumed) return false;
             });
         $(document)
-            .off('click.apply-shortcuts', '.stag-shortcuts>.sc')
-            .on('click.apply-shortcuts', '.stag-shortcuts>.sc', function(_e) {
+            .off('mousedown.apply-shortcuts', '.stag-shortcuts>.sc')
+            .on('mousedown.apply-shortcuts', '.stag-shortcuts>.sc', function(_e) {
                 index = $(this).index();
                 apply();
                 return false;
@@ -182,7 +182,7 @@
         $(document)
             .off('mousedown.add-shortcuts', '.add-shortcut')
             .on('mousedown.add-shortcuts', '.add-shortcut', function(_e) {
-                let hasFocus = $(document.activeElement).closest('.note-content').length;
+                let hasFocus = $(document.activeElement).closest('.note-content, .rte-holder').length;
                 if(hasFocus) {
                     selectedText = window.getSelection().toString();
                     if(selectedText !== '') return;
@@ -223,6 +223,14 @@
                     }
                 }, 'json');
                 return false;
+            })
+            .off('reset.add-shortcut', '#create-shortcut-form')
+            .on('reset.add-shortcut', '#create-shortcut-form', function(_e) {
+                if(!input) input = $('.note-content [contenteditable][data-editor-id="' + $(this).attr('data-editor-id') + '"]').first();
+                if(!input) return false;
+                hideMoeFormMask();
+                $('#create-shortcut-form').hide();
+                $(input).focus();
             });
 
     }

+ 72 - 1
resources/views/app/patient/note/dashboard.blade.php

@@ -257,6 +257,7 @@
                             $packed[] = $shortcut->shortcut . '|||' . $shortcut->text;
                         }
                         $packed = implode("^^^", $packed);
+                        $shortcuts = $packed;
                         ?>
                         {{--<div class="primary-form">
                             <div class="note-content {{ $note->is_cancelled ? 'cancelled' : '' }} {{ $note->is_signed_by_hcp ? 'readonly' : '' }}"
@@ -267,7 +268,7 @@
                         </div>--}}
                         @foreach($note->sections as $section)
                         <div class="p-3 border-bottom note-section">
-                            <a class="font-weight-bold mb-2 d-flex align-items-center c-pointer" onclick="return $(this).parent().toggleClass('edit')">
+                            <a class="font-weight-bold mb-2 d-flex align-items-center c-pointer edit-trigger">
                                 {{$section->sectionTemplate->title}}
                                 <span class="d-none if-not-edit"><i class="fa fa-edit ml-2"></i></span>
                             </a>
@@ -395,4 +396,74 @@
             </div>
         </div>
     </div>
+    <script>
+        (function() {
+            function init() {
+                $('textarea[rte]').each(function() {
+
+                    $(this).wrap(
+                        $('<div class="border-left border-right rte-holder"/>')
+                            .attr('data-shortcuts', '{{ $packed }}')
+                    );
+
+                    // give a unique id to this editor instance
+                    var editorID = Math.ceil(Math.random() * 99999),
+                        fieldName = this.name;
+
+                    var ti = $('<input type="hidden" />')
+                        .val(this.value)
+                        .attr('name', this.name)
+                        .insertBefore(this);
+                    var ce = $('<div data-editor-id="' + editorID + '" data-field="' + this.name + '"/>')
+                        .html(this.value)
+                        .insertBefore(this);
+                    $(this).remove();
+
+                    var qe = new Quill('[data-editor-id="' + editorID + '"]', {
+                        theme: 'snow',
+                        modules: {
+                            keyboard: {
+                                bindings: {
+                                    handleEnter: {
+                                        key: 13,
+                                        handler: function() {
+                                            if(!$('.stag-shortcuts:visible').length) return true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    });
+                    var toolbar = $(qe.container).prev('.ql-toolbar');
+
+                    // add button for new shortcut
+                    var newSCButton = $('<button class="btn bg-white btn-sm btn-default text-primary w-auto px-2 border py-0 ' +
+                        'text-sm add-shortcut" data-editor-id="' + editorID + '">+ Shortcut</button>');
+                    toolbar.append(newSCButton);
+
+                    qe.on('text-change', function() {
+                        ti.val(qe.root.innerHTML);
+                    });
+
+                    $(qe.container)
+                        .find('.ql-editor[contenteditable]')
+                            .attr('data-field', fieldName)
+                            .attr('data-editor-id', editorID)
+                            .attr('with-shortcuts', 1);
+
+                });
+
+                $('.edit-trigger')
+                    .off('click.edit-trigger')
+                    .on('click.edit-trigger', function() {
+                        $(this).parent().toggleClass('edit');
+                        if($(this).parent().is('.edit')) {
+                            $(this).parent().find('[contenteditable]').first().focus();
+                        }
+                        return false;
+                    })
+            }
+            addMCInitializer('note-single', init);
+        })();
+    </script>
 @endsection

+ 1 - 1
storage/sections/allergies/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/articulation/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/assessment/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/cc/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/current-goals/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/dsm-5/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/fhx/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/fluency/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/goals/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/health-concerns/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/history/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/hospitalizations/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/implantable-devices/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/impression/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/medication/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/mental-functional/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/minor-procedures/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/mse/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/objective-speech-language/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/objective/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/oral-mechanism-exam/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/plan/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/pmhx/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/pragmatics/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/pshx/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/psych-impression/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/psychfhx/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/psychhx/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/psychshx/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/receptive-expressive-language/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/results/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/ros/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/sochx/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/speech-development/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 4 - 1
storage/sections/subjective/form.blade.php

@@ -18,7 +18,10 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2"
+                  name="value"
+                  data-shortcuts="{{ $shortcuts }}"
+                  placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/tests/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/vitals/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>

+ 1 - 1
storage/sections/voice/form.blade.php

@@ -18,7 +18,7 @@ $formID = rand(0, 100000);
         <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
     <?php endif; ?>
     <div class="form-group mb-2">
-        <textarea type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
+        <textarea rte type="text" class="form-control form-control-sm p-2" name="value" placeholder="Value"><?= $contentData['value'] ?></textarea>
     </div>
     <div class="form-group m-0 d-flex">
         <button class="btn btn-sm btn-primary mr-2">Submit</button>