Jake Vanderwerf
2026-01-04 d38d825e3484d822ea3c1f0fb1df37ecf386b18a
assets/js/concise/quill.js
@@ -12,7 +12,7 @@
         editor.className = 'editor';
         toolbar = document.createElement('div');
         toolbar.className = 'toolbar';
         const image = textarea.dataset.allowimage === true ? `<button type="button" class="ql-jvb_image">\n                    ${dashboardSettings.icons.image}\n                </button>` : '';
         const image = textarea.dataset.allowimage === true ? `<button type="button" class="ql-jvb_image">\n                    ${window.getIcon('image')}\n                </button>` : '';
         toolbar.id = `toolbar-${textarea.id}`;
         toolbar.innerHTML = `
                <span class="ql-formats">
@@ -93,10 +93,10 @@
                  h1: function() { this.quill.format('header', 1); },
                  h2: function() { this.quill.format('header', 2); },
                  h3: function() { this.quill.format('header', 3); },
                  jvb_bold: function() {this.quill.format('bold', true)},
                  jvb_italic: function() {this.quill.format('italic', true)},
                  jvb_strike: function() {this.quill.format('strike', true)},
                  jvb_underline: function() {this.quill.format('underline', true)},
                  'jvb_bold': function() {this.quill.format('bold', true)},
                  'jvb_italic': function() {this.quill.format('italic', true)},
                  'jvb_strike': function() {this.quill.format('strike', true)},
                  'jvb_underline': function() {this.quill.format('underline', true)},
                  'jvb_align': function(value) {
                     this.quill.format('align', value === this.quill.getFormat().list ? false : value);
                  },
@@ -107,8 +107,6 @@
                     if (value) {
                        const range = this.quill.getSelection();
                        if (range == null || range.length === 0) return;
                        // Get the existing link if any
                        const preview = this.quill.getText(range.index, range.length);
                        const existingLink = this.quill.getFormat(range).link;
                        // Create modal for link input
@@ -196,11 +194,6 @@
                           formData.append('post_id', objectID);
                        }
                        // Show loading state
                        if (window.jvbLoading) {
                           window.jvbLoading.showLoading('Uploading image...', 'Processing Upload');
                        }
                        try {
                           const response = await fetch(
                              `${jvbSettings.api}uploads/`,
@@ -229,9 +222,6 @@
                              'italic': true
                           }, true);
                        } finally {
                           if (window.jvbLoading) {
                              window.jvbLoading.hide();
                           }
                           input.remove();
                        }
                     };