rapid-text-editor 1.0.7 → 1.0.8

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.
@@ -552,7 +552,7 @@ RapidTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
552
552
  useExisting: forwardRef(() => RapidTextEditorComponent),
553
553
  multi: true
554
554
  }
555
- ], viewQueries: [{ propertyName: "editor", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "tableDialog", first: true, predicate: ["tableDialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
555
+ ], viewQueries: [{ propertyName: "editor", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "tableDialog", first: true, predicate: ["tableDialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
556
556
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: RapidTextEditorComponent, decorators: [{
557
557
  type: Component,
558
558
  args: [{ selector: 'rapid-text-editor', providers: [
@@ -561,7 +561,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
561
561
  useExisting: forwardRef(() => RapidTextEditorComponent),
562
562
  multi: true
563
563
  }
564
- ], template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"] }]
564
+ ], template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"] }]
565
565
  }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { contentCapture: [{
566
566
  type: Input
567
567
  }], height: [{
@@ -571,7 +571,7 @@ RapidTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
571
571
  useExisting: forwardRef(() => RapidTextEditorComponent),
572
572
  multi: true
573
573
  }
574
- ], viewQueries: [{ propertyName: "editor", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "tableDialog", first: true, predicate: ["tableDialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
574
+ ], viewQueries: [{ propertyName: "editor", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "tableDialog", first: true, predicate: ["tableDialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
575
575
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: RapidTextEditorComponent, decorators: [{
576
576
  type: Component,
577
577
  args: [{ selector: 'rapid-text-editor', providers: [
@@ -580,7 +580,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
580
580
  useExisting: forwardRef(() => RapidTextEditorComponent),
581
581
  multi: true
582
582
  }
583
- ], template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"] }]
583
+ ], template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"] }]
584
584
  }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { contentCapture: [{
585
585
  type: Input
586
586
  }], height: [{
@@ -1 +1 @@
1
- {"version":3,"file":"rapid-text-editor.mjs","sources":["../../../projects/rapid-text-editor/src/lib/rapid-text-editor.service.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.html","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.module.ts","../../../projects/rapid-text-editor/src/public-api.ts","../../../projects/rapid-text-editor/src/rapid-text-editor.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RapidTextEditorService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, Output, OnInit, ViewChild, OnChanges, TemplateRef, forwardRef, EventEmitter, AfterViewInit, SimpleChange, SimpleChanges, Renderer2} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'rapid-text-editor',\n templateUrl: './rapid-text-editor.component.html',\n styleUrls: ['./rapid-text-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RapidTextEditorComponent),\n multi: true\n }\n ]\n \n})\nexport class RapidTextEditorComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\n\n\n @Input() contentCapture: boolean = false;\n @Input() height: string = \"300px\";\n @Input() width: string = \"auto\";\n @Output() contentChange = new EventEmitter<string>();\n @ViewChild('editor', { static: true }) editor!: ElementRef;\n @ViewChild('tableDialog') tableDialog!: TemplateRef<any>;\n private editorContent: string = '';\n rows: number = 1;\n cols: number = 1;\n grid = Array(49).fill(0);\n Math = Math;\n uploadedImages: string[] = [];\n\n\n\n constructor(private dialog: MatDialog, private el: ElementRef,private renderer: Renderer2, private elRef: ElementRef) {\n console.log('Build -1')\n }\n \n ngOnInit(): void {\n if (this.contentCapture) {\n console.log('Content capture is enabled.');\n } else {\n console.log('Content capture is disabled.');\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['height'] || changes['width']) {\n this.applyDimensions();\n }\n }\n\n private applyDimensions(): void {\n const editorElement = this.elRef.nativeElement.querySelector('.dimension');\n if (this.height) {\n this.renderer.setStyle(editorElement, 'height', this.height);\n }\n if (this.width) {\n this.renderer.setStyle(editorElement, 'width', this.width);\n }\n }\n\n ngAfterViewInit(): void {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (!editor) {\n console.error('Editor element not found.');\n }\n }\n\n \n\n onContentChange(): void {\n if (this.contentCapture) {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (editor) {\n this.editorContent = editor.innerHTML;\n console.log('Captured Content (Child):', this.editorContent);\n this.contentChange.emit(this.editorContent);\n } else {\n console.error('Editor element not found.');\n }\n }\n }\n\n \n\n getContent(): string {\n return this.editorContent;\n }\n\n //Two Way Data Binding Functionality\n\n private onChange = (content: string) => {};\n private onTouched = () => {};\n\n // Called by Angular to update the value programmatically\n writeValue(content: string): void {\n if (this.editor && this.editor.nativeElement) {\n this.editor.nativeElement.innerHTML = content || '';\n }\n }\n\n // Registers the onChange callback to notify Angular of content changes\n registerOnChange(fn: (content: string) => void): void {\n this.onChange = fn;\n }\n\n // Registers the onTouched callback for blur events\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n\n onBlur() {\n this.onTouched();\n }\n\n\n\n format(command: string): void {\n document.execCommand(command, false, '');\n }\n\n setHeading(event: Event): void {\n const value = (event.target as HTMLSelectElement).value;\n document.execCommand('formatBlock', false, value);\n }\n\n //Image Section\n \n allowDrop(event: DragEvent): void {\n event.preventDefault(); \n }\n\n // Handle image drag start\n drag(event: DragEvent, imageUrl: string): void {\n event.dataTransfer?.setData(\"text\", imageUrl); \n }\n\n // Handle drop event in the editor\n drop(event: DragEvent): void {\n event.preventDefault(); \n const imageUrl = event.dataTransfer?.getData(\"text\"); \n if (imageUrl) {\n this.insertImageInEditor(imageUrl); \n }\n }\n\n // insertImage(event: any): void {\n // const files: FileList = event.target.files;\n \n // if (!files || files.length === 0) {\n // console.error('No files selected.');\n // return;\n // }\n \n // Array.from(files).forEach((file) => {\n // // Check file type\n // if (file.type !== 'image/png' && !file.type.startsWith('image/')) {\n // console.error('Unsupported file type:', file.type);\n // return;\n // }\n \n // // Read the image file\n // const reader = new FileReader();\n // reader.onload = (e: any) => {\n // const imageUrl = e.target.result;\n \n // // Add image to the uploaded images list\n // this.uploadedImages.push(imageUrl);\n \n // // Call insertImageInEditor to add the image to the editor\n // this.insertImageInEditor(imageUrl);\n // };\n // reader.readAsDataURL(file);\n // });\n // } -> for PNG\n\n removeImage(index: number): void {\n this.uploadedImages.splice(index, 1);\n }\n \n insertImageInEditor(imageUrl: string): void {\n const editor = document.querySelector('.editor') as HTMLElement;\n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n // Create image element\n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n \n // Create a wrapper around the image to allow resizing\n const wrapper = document.createElement('div');\n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block'; // Ensures the wrapper only takes up space for the image\n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.border = '1px dashed #ccc'; // Optional border to indicate the image area\n \n // Append the image to the wrapper\n wrapper.appendChild(img);\n \n // Append the wrapper to the editor\n editor.appendChild(wrapper);\n \n // Make the image resizable\n this.makeImageResizable(wrapper, img);\n \n // Optionally, add a text node to maintain cursor position after appending the image\n const textNode = document.createTextNode('\\u200B'); // Invisible character to maintain position\n editor.appendChild(textNode);\n \n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n \n makeImageResizable(wrapper: HTMLElement, img: HTMLImageElement): void {\n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n // Create resize handles for the image\n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n // Add resizing handles to the wrapper for the image\n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n }\n \n\n insertImage(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (input?.files) {\n Array.from(input.files).forEach(file => {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n this.uploadedImages.push(imageUrl); // Store image URL in the array\n };\n reader.readAsDataURL(file);\n });\n }\n }\n \n\n convertImage(file: File): Promise<File> {\n return new Promise((resolve, reject) => {\n if (file.type !== 'image/png') {\n resolve(file); // Return the original file if it's not a PNG\n return;\n }\n \n const img = new Image();\n const reader = new FileReader();\n \n reader.onload = (e: any) => {\n img.src = e.target.result;\n \n img.onload = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n \n if (!ctx) {\n reject(new Error('Failed to get canvas context'));\n return;\n }\n \n canvas.width = img.width;\n canvas.height = img.height;\n \n ctx.drawImage(img, 0, 0);\n canvas.toBlob(\n blob => {\n if (blob) {\n const jpgFile = new File([blob], file.name.replace(/\\.png$/, '.jpg'), { type: 'image/jpeg' });\n resolve(jpgFile);\n } else {\n reject(new Error('Failed to convert PNG to JPG'));\n }\n },\n 'image/jpeg',\n 0.95 // Quality factor for JPEG\n );\n };\n };\n \n reader.onerror = () => reject(new Error('Failed to read the file'));\n reader.readAsDataURL(file);\n });\n }\n \n \n \n\n // insertImageByDrag(imageUrl: string): void {\n // const editor = document.querySelector('.editor') as HTMLElement;\n // if (!editor) {\n // console.error('Editor element not found.');\n // return;\n // }\n\n // const img = document.createElement('img');\n // img.src = imageUrl;\n // img.style.maxWidth = '100%';\n // img.style.display = 'block';\n // img.style.width = '300px'; \n // img.style.height = 'auto';\n\n // editor.appendChild(img);\n // }\n \n\n insertImageToEditor(event: any): void {\n const file = event.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n const editor = document.querySelector('.editor') as HTMLElement;\n \n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n \n const wrapper = document.createElement('div');\n wrapper.contentEditable = 'false'; \n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block';\n wrapper.style.border = '1px dashed #ccc'; \n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.borderBlockColor = '#007BFF';\n \n \n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n wrapper.appendChild(img);\n \n \n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n \n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n \n \n editor.appendChild(wrapper);\n \n \n const textNode = document.createTextNode('\\u200B'); \n editor.appendChild(textNode);\n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n };\n reader.readAsDataURL(file);\n }\n }\n \n \n\n \n\n\n openTableDialog(event: MouseEvent): void {\n this.rows = 1; \n this.cols = 1;\n\n const dialogRef = this.dialog.open(this.tableDialog, {\n position: {\n top: `${event.clientY}px`,\n left: `${event.clientX}px`,\n },\n panelClass: 'custom-dialog-container'\n });\n\n dialogRef.afterClosed().subscribe((result) => {\n if (result) {\n this.insertTable(result.rows, result.cols);\n }\n });\n }\n\n updatePreview(cols: number, rows: number) {\n this.cols = cols;\n this.rows = rows;\n }\n\n updateSelection(colIndex: number, rowIndex: number, dialogRef: any) {\n this.cols = colIndex;\n this.rows = rowIndex;\n dialogRef.close({ rows: this.rows, cols: this.cols }); // Close dialog with selection\n }\n \n \n\n makeFirstRowHeader(): void {\n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Check if selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n alert('Please place the cursor inside the table to make the first row a header.');\n return;\n }\n \n // Find the closest table to the selection\n const range = selection.getRangeAt(0);\n const selectedNode = range.startContainer;\n const table = this.findClosestTable(selectedNode);\n \n if (!table) {\n alert('No table found near the cursor.');\n return;\n }\n \n // Convert the first row cells to header cells\n const firstRow = table.rows[0];\n if (firstRow) {\n for (let i = 0; i < firstRow.cells.length; i++) {\n const cell = firstRow.cells[i];\n const th = document.createElement('th');\n th.innerHTML = cell.innerHTML;\n th.style.textAlign = 'center';\n th.style.backgroundColor = '#F1F1F0';\n th.style.border = '1px solid black';\n th.style.borderCollapse = 'collapse';\n th.style.padding = window.getComputedStyle(cell).padding; // Retain padding\n th.style.width = window.getComputedStyle(cell).width; // Retain width\n th.style.height = window.getComputedStyle(cell).height;\n firstRow.replaceChild(th, cell);\n }\n }\n \n editor.focus();\n }\n \n private findClosestTable(node: Node): HTMLTableElement | null {\n while (node && node !== document) {\n if (node.nodeName === 'TABLE') {\n return node as HTMLTableElement;\n }\n node = node.parentNode!;\n }\n return null;\n }\n \n \n insertTable(rows: string, cols: string): void {\n const rowCount = parseInt(rows, 10);\n const colCount = parseInt(cols, 10);\n \n if (isNaN(rowCount) || isNaN(colCount) || rowCount < 1 || colCount < 1) {\n alert('Please enter valid numbers for rows and columns.');\n return;\n }\n \n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Ensure selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n // Append the table at the end if selection is outside editor\n this.appendTable(editor, rowCount, colCount);\n return;\n }\n \n // Proceed to insert the table if selection is valid\n const tableHTML = this.createTableHTML(rowCount, colCount);\n const range = selection.getRangeAt(0);\n range.deleteContents(); // Remove any selected content\n \n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = tableHTML;\n \n range.insertNode(tempDiv.firstChild!); // Insert the table\n \n // Move the cursor to the first cell of the new table\n this.setCursorToFirstCell(tempDiv.firstChild as HTMLElement);\n editor.focus();\n }\n \n // Helper function: Create table HTML\n private createTableHTML(rowCount: number, colCount: number): string {\n let tableHTML = '<table border=\"1\" style=\"border-collapse: collapse; margin:5px\">';\n for (let i = 0; i < rowCount; i++) {\n tableHTML += '<tr>';\n for (let j = 0; j < colCount; j++) {\n tableHTML += `<td style=\"font-size: 14px; min-width: 1.5em; height: 2em; padding: .4em; border: 1px solid black\" \n role=\"textbox\" contenteditable=\"true\"></td>`;\n }\n tableHTML += '</tr>';\n }\n tableHTML += '</table>';\n return tableHTML;\n }\n \n \n // Helper function: Append a table at the end of the editor\n private appendTable(editor: HTMLElement, rowCount: number, colCount: number): void {\n const tableHTML = this.createTableHTML(rowCount, colCount);\n editor.innerHTML += tableHTML;\n \n // Set cursor inside the first cell of the new table\n const lastInsertedTable = editor.querySelector('table:last-child') as HTMLElement;\n this.setCursorToFirstCell(lastInsertedTable);\n editor.focus();\n }\n \n // Helper function: Check if selection is inside the editor\n private isSelectionInsideEditor(editor: HTMLElement, selection: Selection): boolean {\n if (!selection.rangeCount) return false;\n let node = selection.getRangeAt(0).commonAncestorContainer;\n \n // Traverse up to see if the node belongs to the editor\n while (node) {\n if (node === editor) return true;\n node = node.parentNode!;\n }\n return false;\n }\n \n // Helper function: Move cursor to the first cell\n // private setCursorToFirstCell(table: HTMLElement) {\n // const firstCell = table.querySelector('tr:first-child td:first-child') as HTMLElement;\n \n // if (firstCell) {\n // const newRange = document.createRange();\n // newRange.setStart(firstCell, 0); // Start at the beginning of the cell\n // newRange.collapse(true);\n \n // const selection = window.getSelection();\n // selection!.removeAllRanges();\n // selection!.addRange(newRange);\n // }\n // }\n\n private setCursorToFirstCell(table: HTMLElement): void {\n const firstCell = table.querySelector('tr:first-child td:first-child, tr:first-child th:first-child') as HTMLElement;\n\n if (firstCell) {\n // Ensure the cell is contenteditable\n firstCell.setAttribute('contenteditable', 'true');\n\n // Focus the cell\n firstCell.focus();\n\n // Create a range and place the cursor at the start of the cell\n const newRange = document.createRange();\n newRange.selectNodeContents(firstCell); // Select the contents of the cell\n newRange.collapse(true); // Collapse to the start\n\n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n }\n }\n\n \n \n\n insertPageBreak(): void {\n const pageBreak = `<div style=\"page-break-after: always;\"><br /></div>`;\n document.execCommand('insertHTML', false, pageBreak);\n }\n\n submitContent(): void {\n const editor = this.editor.nativeElement;\n const content = editor.innerHTML; // Get the HTML content from the editor\n const plainTextContent = editor.innerText; // Optionally, get plain text content\n\n // For demonstration, you can log it or process it as needed\n this.onChange(content);\n\n // Example: You could send this data to a server or use it elsewhere in your application\n // this.yourService.submitContent({ content }); // Replace with your service call\n }\n\n}\n","<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ","import { NgModule } from '@angular/core';\nimport { RapidTextEditorComponent } from './rapid-text-editor.component';\n\n//Mat Modules\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [\n RapidTextEditorComponent\n ],\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule\n ],\n exports: [\n RapidTextEditorComponent\n ]\n})\nexport class RapidTextEditorModule { }\n","/*\n * Public API Surface of rapid-text-editor\n */\n\nexport * from './lib/rapid-text-editor.service';\nexport * from './lib/rapid-text-editor.component';\nexport * from './lib/rapid-text-editor.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAKa,sBAAsB,CAAA;AAEjC,IAAA,WAAA,GAAA,GAAiB;;oHAFN,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,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AA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;oHAArB,qBAAqB,EAAA,YAAA,EAAA,CAZ9B,wBAAwB,CAAA,EAAA,OAAA,EAAA,CAGxB,YAAY;QACZ,aAAa;QACb,eAAe;QACf,eAAe,aAGf,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAGf,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAVvB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,aAAa;YACb,eAAe;YACf,eAAe;SAChB,CAAA,EAAA,CAAA,CAAA;4FAKU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;AACzB,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"rapid-text-editor.mjs","sources":["../../../projects/rapid-text-editor/src/lib/rapid-text-editor.service.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.html","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.module.ts","../../../projects/rapid-text-editor/src/public-api.ts","../../../projects/rapid-text-editor/src/rapid-text-editor.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RapidTextEditorService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, Output, OnInit, ViewChild, OnChanges, TemplateRef, forwardRef, EventEmitter, AfterViewInit, SimpleChange, SimpleChanges, Renderer2} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'rapid-text-editor',\n templateUrl: './rapid-text-editor.component.html',\n styleUrls: ['./rapid-text-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RapidTextEditorComponent),\n multi: true\n }\n ]\n \n})\nexport class RapidTextEditorComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\n\n\n @Input() contentCapture: boolean = false;\n @Input() height: string = \"300px\";\n @Input() width: string = \"auto\";\n @Output() contentChange = new EventEmitter<string>();\n @ViewChild('editor', { static: true }) editor!: ElementRef;\n @ViewChild('tableDialog') tableDialog!: TemplateRef<any>;\n private editorContent: string = '';\n rows: number = 1;\n cols: number = 1;\n grid = Array(49).fill(0);\n Math = Math;\n uploadedImages: string[] = [];\n\n\n\n constructor(private dialog: MatDialog, private el: ElementRef,private renderer: Renderer2, private elRef: ElementRef) {\n console.log('Build -1')\n }\n \n ngOnInit(): void {\n if (this.contentCapture) {\n console.log('Content capture is enabled.');\n } else {\n console.log('Content capture is disabled.');\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['height'] || changes['width']) {\n this.applyDimensions();\n }\n }\n\n private applyDimensions(): void {\n const editorElement = this.elRef.nativeElement.querySelector('.dimension');\n if (this.height) {\n this.renderer.setStyle(editorElement, 'height', this.height);\n }\n if (this.width) {\n this.renderer.setStyle(editorElement, 'width', this.width);\n }\n }\n\n ngAfterViewInit(): void {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (!editor) {\n console.error('Editor element not found.');\n }\n }\n\n \n\n onContentChange(): void {\n if (this.contentCapture) {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (editor) {\n this.editorContent = editor.innerHTML;\n console.log('Captured Content (Child):', this.editorContent);\n this.contentChange.emit(this.editorContent);\n } else {\n console.error('Editor element not found.');\n }\n }\n }\n\n \n\n getContent(): string {\n return this.editorContent;\n }\n\n //Two Way Data Binding Functionality\n\n private onChange = (content: string) => {};\n private onTouched = () => {};\n\n // Called by Angular to update the value programmatically\n writeValue(content: string): void {\n if (this.editor && this.editor.nativeElement) {\n this.editor.nativeElement.innerHTML = content || '';\n }\n }\n\n // Registers the onChange callback to notify Angular of content changes\n registerOnChange(fn: (content: string) => void): void {\n this.onChange = fn;\n }\n\n // Registers the onTouched callback for blur events\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n\n onBlur() {\n this.onTouched();\n }\n\n\n\n format(command: string): void {\n document.execCommand(command, false, '');\n }\n\n setHeading(event: Event): void {\n const value = (event.target as HTMLSelectElement).value;\n document.execCommand('formatBlock', false, value);\n }\n\n //Image Section\n \n allowDrop(event: DragEvent): void {\n event.preventDefault(); \n }\n\n // Handle image drag start\n drag(event: DragEvent, imageUrl: string): void {\n event.dataTransfer?.setData(\"text\", imageUrl); \n }\n\n // Handle drop event in the editor\n drop(event: DragEvent): void {\n event.preventDefault(); \n const imageUrl = event.dataTransfer?.getData(\"text\"); \n if (imageUrl) {\n this.insertImageInEditor(imageUrl); \n }\n }\n\n // insertImage(event: any): void {\n // const files: FileList = event.target.files;\n \n // if (!files || files.length === 0) {\n // console.error('No files selected.');\n // return;\n // }\n \n // Array.from(files).forEach((file) => {\n // // Check file type\n // if (file.type !== 'image/png' && !file.type.startsWith('image/')) {\n // console.error('Unsupported file type:', file.type);\n // return;\n // }\n \n // // Read the image file\n // const reader = new FileReader();\n // reader.onload = (e: any) => {\n // const imageUrl = e.target.result;\n \n // // Add image to the uploaded images list\n // this.uploadedImages.push(imageUrl);\n \n // // Call insertImageInEditor to add the image to the editor\n // this.insertImageInEditor(imageUrl);\n // };\n // reader.readAsDataURL(file);\n // });\n // } -> for PNG\n\n removeImage(index: number): void {\n this.uploadedImages.splice(index, 1);\n }\n \n insertImageInEditor(imageUrl: string): void {\n const editor = document.querySelector('.editor') as HTMLElement;\n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n // Create image element\n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n \n // Create a wrapper around the image to allow resizing\n const wrapper = document.createElement('div');\n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block'; // Ensures the wrapper only takes up space for the image\n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.border = '1px dashed #ccc'; // Optional border to indicate the image area\n \n // Append the image to the wrapper\n wrapper.appendChild(img);\n \n // Append the wrapper to the editor\n editor.appendChild(wrapper);\n \n // Make the image resizable\n this.makeImageResizable(wrapper, img);\n \n // Optionally, add a text node to maintain cursor position after appending the image\n const textNode = document.createTextNode('\\u200B'); // Invisible character to maintain position\n editor.appendChild(textNode);\n \n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n \n makeImageResizable(wrapper: HTMLElement, img: HTMLImageElement): void {\n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n // Create resize handles for the image\n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n // Add resizing handles to the wrapper for the image\n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n }\n \n\n insertImage(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (input?.files) {\n Array.from(input.files).forEach(file => {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n this.uploadedImages.push(imageUrl); // Store image URL in the array\n };\n reader.readAsDataURL(file);\n });\n }\n }\n \n\n convertImage(file: File): Promise<File> {\n return new Promise((resolve, reject) => {\n if (file.type !== 'image/png') {\n resolve(file); // Return the original file if it's not a PNG\n return;\n }\n \n const img = new Image();\n const reader = new FileReader();\n \n reader.onload = (e: any) => {\n img.src = e.target.result;\n \n img.onload = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n \n if (!ctx) {\n reject(new Error('Failed to get canvas context'));\n return;\n }\n \n canvas.width = img.width;\n canvas.height = img.height;\n \n ctx.drawImage(img, 0, 0);\n canvas.toBlob(\n blob => {\n if (blob) {\n const jpgFile = new File([blob], file.name.replace(/\\.png$/, '.jpg'), { type: 'image/jpeg' });\n resolve(jpgFile);\n } else {\n reject(new Error('Failed to convert PNG to JPG'));\n }\n },\n 'image/jpeg',\n 0.95 // Quality factor for JPEG\n );\n };\n };\n \n reader.onerror = () => reject(new Error('Failed to read the file'));\n reader.readAsDataURL(file);\n });\n }\n \n \n \n\n // insertImageByDrag(imageUrl: string): void {\n // const editor = document.querySelector('.editor') as HTMLElement;\n // if (!editor) {\n // console.error('Editor element not found.');\n // return;\n // }\n\n // const img = document.createElement('img');\n // img.src = imageUrl;\n // img.style.maxWidth = '100%';\n // img.style.display = 'block';\n // img.style.width = '300px'; \n // img.style.height = 'auto';\n\n // editor.appendChild(img);\n // }\n \n\n insertImageToEditor(event: any): void {\n const file = event.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n const editor = document.querySelector('.editor') as HTMLElement;\n \n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n \n const wrapper = document.createElement('div');\n wrapper.contentEditable = 'false'; \n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block';\n wrapper.style.border = '1px dashed #ccc'; \n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.borderBlockColor = '#007BFF';\n \n \n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n wrapper.appendChild(img);\n \n \n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n \n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n \n \n editor.appendChild(wrapper);\n \n \n const textNode = document.createTextNode('\\u200B'); \n editor.appendChild(textNode);\n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n };\n reader.readAsDataURL(file);\n }\n }\n \n \n\n \n\n\n openTableDialog(event: MouseEvent): void {\n this.rows = 1; \n this.cols = 1;\n\n const dialogRef = this.dialog.open(this.tableDialog, {\n position: {\n top: `${event.clientY}px`,\n left: `${event.clientX}px`,\n },\n panelClass: 'custom-dialog-container'\n });\n\n dialogRef.afterClosed().subscribe((result) => {\n if (result) {\n this.insertTable(result.rows, result.cols);\n }\n });\n }\n\n updatePreview(cols: number, rows: number) {\n this.cols = cols;\n this.rows = rows;\n }\n\n updateSelection(colIndex: number, rowIndex: number, dialogRef: any) {\n this.cols = colIndex;\n this.rows = rowIndex;\n dialogRef.close({ rows: this.rows, cols: this.cols }); // Close dialog with selection\n }\n \n \n\n makeFirstRowHeader(): void {\n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Check if selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n alert('Please place the cursor inside the table to make the first row a header.');\n return;\n }\n \n // Find the closest table to the selection\n const range = selection.getRangeAt(0);\n const selectedNode = range.startContainer;\n const table = this.findClosestTable(selectedNode);\n \n if (!table) {\n alert('No table found near the cursor.');\n return;\n }\n \n // Convert the first row cells to header cells\n const firstRow = table.rows[0];\n if (firstRow) {\n for (let i = 0; i < firstRow.cells.length; i++) {\n const cell = firstRow.cells[i];\n const th = document.createElement('th');\n th.innerHTML = cell.innerHTML;\n th.style.textAlign = 'center';\n th.style.backgroundColor = '#F1F1F0';\n th.style.border = '1px solid black';\n th.style.borderCollapse = 'collapse';\n th.style.padding = window.getComputedStyle(cell).padding; // Retain padding\n th.style.width = window.getComputedStyle(cell).width; // Retain width\n th.style.height = window.getComputedStyle(cell).height;\n firstRow.replaceChild(th, cell);\n }\n }\n \n editor.focus();\n }\n \n private findClosestTable(node: Node): HTMLTableElement | null {\n while (node && node !== document) {\n if (node.nodeName === 'TABLE') {\n return node as HTMLTableElement;\n }\n node = node.parentNode!;\n }\n return null;\n }\n \n \n insertTable(rows: string, cols: string): void {\n const rowCount = parseInt(rows, 10);\n const colCount = parseInt(cols, 10);\n \n if (isNaN(rowCount) || isNaN(colCount) || rowCount < 1 || colCount < 1) {\n alert('Please enter valid numbers for rows and columns.');\n return;\n }\n \n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Ensure selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n // Append the table at the end if selection is outside editor\n this.appendTable(editor, rowCount, colCount);\n return;\n }\n \n // Proceed to insert the table if selection is valid\n const tableHTML = this.createTableHTML(rowCount, colCount);\n const range = selection.getRangeAt(0);\n range.deleteContents(); // Remove any selected content\n \n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = tableHTML;\n \n range.insertNode(tempDiv.firstChild!); // Insert the table\n \n // Move the cursor to the first cell of the new table\n this.setCursorToFirstCell(tempDiv.firstChild as HTMLElement);\n editor.focus();\n }\n \n // Helper function: Create table HTML\n private createTableHTML(rowCount: number, colCount: number): string {\n let tableHTML = '<table border=\"1\" style=\"border-collapse: collapse; margin:5px\">';\n for (let i = 0; i < rowCount; i++) {\n tableHTML += '<tr>';\n for (let j = 0; j < colCount; j++) {\n tableHTML += `<td style=\"font-size: 14px; min-width: 1.5em; height: 2em; padding: .4em; border: 1px solid black\" \n role=\"textbox\" contenteditable=\"true\"></td>`;\n }\n tableHTML += '</tr>';\n }\n tableHTML += '</table>';\n return tableHTML;\n }\n \n \n // Helper function: Append a table at the end of the editor\n private appendTable(editor: HTMLElement, rowCount: number, colCount: number): void {\n const tableHTML = this.createTableHTML(rowCount, colCount);\n editor.innerHTML += tableHTML;\n \n // Set cursor inside the first cell of the new table\n const lastInsertedTable = editor.querySelector('table:last-child') as HTMLElement;\n this.setCursorToFirstCell(lastInsertedTable);\n editor.focus();\n }\n \n // Helper function: Check if selection is inside the editor\n private isSelectionInsideEditor(editor: HTMLElement, selection: Selection): boolean {\n if (!selection.rangeCount) return false;\n let node = selection.getRangeAt(0).commonAncestorContainer;\n \n // Traverse up to see if the node belongs to the editor\n while (node) {\n if (node === editor) return true;\n node = node.parentNode!;\n }\n return false;\n }\n \n // Helper function: Move cursor to the first cell\n // private setCursorToFirstCell(table: HTMLElement) {\n // const firstCell = table.querySelector('tr:first-child td:first-child') as HTMLElement;\n \n // if (firstCell) {\n // const newRange = document.createRange();\n // newRange.setStart(firstCell, 0); // Start at the beginning of the cell\n // newRange.collapse(true);\n \n // const selection = window.getSelection();\n // selection!.removeAllRanges();\n // selection!.addRange(newRange);\n // }\n // }\n\n private setCursorToFirstCell(table: HTMLElement): void {\n const firstCell = table.querySelector('tr:first-child td:first-child, tr:first-child th:first-child') as HTMLElement;\n\n if (firstCell) {\n // Ensure the cell is contenteditable\n firstCell.setAttribute('contenteditable', 'true');\n\n // Focus the cell\n firstCell.focus();\n\n // Create a range and place the cursor at the start of the cell\n const newRange = document.createRange();\n newRange.selectNodeContents(firstCell); // Select the contents of the cell\n newRange.collapse(true); // Collapse to the start\n\n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n }\n }\n\n \n \n\n insertPageBreak(): void {\n const pageBreak = `<div style=\"page-break-after: always;\"><br /></div>`;\n document.execCommand('insertHTML', false, pageBreak);\n }\n\n submitContent(): void {\n const editor = this.editor.nativeElement;\n const content = editor.innerHTML; // Get the HTML content from the editor\n const plainTextContent = editor.innerText; // Optionally, get plain text content\n\n // For demonstration, you can log it or process it as needed\n this.onChange(content);\n\n // Example: You could send this data to a server or use it elsewhere in your application\n // this.yourService.submitContent({ content }); // Replace with your service call\n }\n\n}\n","<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ","import { NgModule } from '@angular/core';\nimport { RapidTextEditorComponent } from './rapid-text-editor.component';\n\n//Mat Modules\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [\n RapidTextEditorComponent\n ],\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule\n ],\n exports: [\n RapidTextEditorComponent\n ]\n})\nexport class RapidTextEditorModule { }\n","/*\n * Public API Surface of rapid-text-editor\n */\n\nexport * from './lib/rapid-text-editor.service';\nexport * from './lib/rapid-text-editor.component';\nexport * from './lib/rapid-text-editor.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAKa,sBAAsB,CAAA;AAEjC,IAAA,WAAA,GAAA,GAAiB;;oHAFN,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;4FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;MCaY,wBAAwB,CAAA;AAkBnC,IAAA,WAAA,CAAoB,MAAiB,EAAU,EAAc,EAAS,QAAmB,EAAU,KAAiB,EAAA;AAAhG,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAW;AAAU,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;AAAS,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AAAU,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAY;AAf3G,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK,CAAC;AAChC,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO,CAAC;AACzB,QAAA,IAAK,CAAA,KAAA,GAAW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;wBACf,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;AACzB,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -569,7 +569,7 @@ RapidTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
569
569
  useExisting: forwardRef(() => RapidTextEditorComponent),
570
570
  multi: true
571
571
  }
572
- ], viewQueries: [{ propertyName: "editor", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "tableDialog", first: true, predicate: ["tableDialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
572
+ ], viewQueries: [{ propertyName: "editor", first: true, predicate: ["editor"], descendants: true, static: true }, { propertyName: "tableDialog", first: true, predicate: ["tableDialog"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
573
573
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: RapidTextEditorComponent, decorators: [{
574
574
  type: Component,
575
575
  args: [{ selector: 'rapid-text-editor', providers: [
@@ -578,7 +578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
578
578
  useExisting: forwardRef(() => RapidTextEditorComponent),
579
579
  multi: true
580
580
  }
581
- ], template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"] }]
581
+ ], template: "<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", styles: ["@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n", "@charset \"UTF-8\";.rich-text-editor{border:1px solid #ccc;border-radius:5px}.editor{position:relative;min-height:300px;border:1px solid #ccc;padding:5px;overflow-y:auto;font-family:Calibri;outline:none!important;font-size:14px}button{width:20px;height:20px;background:none;border:none;margin-left:5px;color:#6c757d!important;cursor:pointer}button[mat-icon-button]{margin:0 4px;width:20px!important;height:20px;background:none;border:none}.small-icon-button{width:30px;height:30px;padding:4px}.small-icon-button mat-icon{font-size:16px}button[mat-icon-button]{position:relative;overflow:hidden}input[type=file]{padding:5px;cursor:pointer;margin-left:10px}.fileInput{display:flex;justify-content:center;align-items:center}.select-wrapper{display:inline-block;position:relative;width:150px}.select-wrapper select{appearance:none;width:100%;padding:10px 40px 10px 15px;font-size:16px;color:#333;background-color:#f4f4f4;border:1px solid #ddd;border-radius:5px;cursor:pointer;outline:none}.select-wrapper:after{content:\"\\25bc\";position:absolute;top:50%;right:15px;transform:translateY(-50%);pointer-events:none;color:#777;font-size:12px}.select-wrapper select:hover{background-color:#e9e9e9;border-color:#bbb}.select-wrapper select:focus{border-color:#007bff;background-color:#fff}.select-wrapper option{padding:8px;font-size:16px;color:#333;background-color:#fff}.toolbar{display:flex;flex-wrap:wrap;align-items:center;background-color:#f4f4f4;padding:10px;border-radius:8px;box-shadow:0 2px 8px #0000001a;gap:10px}.select-wrapper{padding:8px;font-size:14px;border:1px solid #ddd;border-radius:5px;cursor:pointer;background-color:#fff}.select-wrapper:focus{outline:none;border-color:#007bff}button{border:none;border-radius:5px;padding:8px;cursor:pointer;display:flex;align-items:center;justify-content:center}button:hover{color:#007bff}button:active{background-color:#0056b3}mat-icon{font-size:20px;color:inherit}input[type=number]{width:60px;padding:5px;font-size:14px;border:1px solid #ddd;border-radius:5px;text-align:center}input[type=file]{border:1px solid #ddd;border-radius:5px;padding:5px;font-size:14px;background-color:#fff;cursor:pointer}input[type=file]:hover{border-color:#007bff}.table{width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.table:hover{background-color:#0056b3;color:#fff!important}.submit{margin-top:10px;width:100px;height:30px;color:#007bff!important;font-weight:700;border:1px solid #007bff}.submit:hover{border:none;background-color:#0056b3;color:#fff!important}.custom-dialog-container{width:auto;max-width:200px}.grid-container{display:grid;grid-template-columns:repeat(7,20px);grid-gap:5px;gap:5px}.grid-item{width:20px;height:20px;border:1px solid #ddd}.highlighted{background-color:#2196f3}div[contenteditable=false]{display:inline-block;position:relative;resize:both;overflow:hidden;border:1px dashed #ccc;margin:5px}div[contenteditable=false]:hover{border-color:#007bff}div[contenteditable=false] img{display:block;width:100%;height:auto}.uploaded-images{display:flex;flex-wrap:wrap;margin-bottom:20px}.image-preview{margin:10px;padding:5px;border:1px dashed #ccc;cursor:pointer}.image-preview img{max-width:100px;max-height:100px;object-fit:cover}.editor{border:1px solid #ccc;min-height:300px;padding:20px;position:relative}.remove_btn{position:relative;top:10px}\n"] }]
582
582
  }], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { contentCapture: [{
583
583
  type: Input
584
584
  }], height: [{
@@ -1 +1 @@
1
- {"version":3,"file":"rapid-text-editor.mjs","sources":["../../../projects/rapid-text-editor/src/lib/rapid-text-editor.service.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.html","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.module.ts","../../../projects/rapid-text-editor/src/public-api.ts","../../../projects/rapid-text-editor/src/rapid-text-editor.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RapidTextEditorService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, Output, OnInit, ViewChild, OnChanges, TemplateRef, forwardRef, EventEmitter, AfterViewInit, SimpleChange, SimpleChanges, Renderer2} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'rapid-text-editor',\n templateUrl: './rapid-text-editor.component.html',\n styleUrls: ['./rapid-text-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RapidTextEditorComponent),\n multi: true\n }\n ]\n \n})\nexport class RapidTextEditorComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\n\n\n @Input() contentCapture: boolean = false;\n @Input() height: string = \"300px\";\n @Input() width: string = \"auto\";\n @Output() contentChange = new EventEmitter<string>();\n @ViewChild('editor', { static: true }) editor!: ElementRef;\n @ViewChild('tableDialog') tableDialog!: TemplateRef<any>;\n private editorContent: string = '';\n rows: number = 1;\n cols: number = 1;\n grid = Array(49).fill(0);\n Math = Math;\n uploadedImages: string[] = [];\n\n\n\n constructor(private dialog: MatDialog, private el: ElementRef,private renderer: Renderer2, private elRef: ElementRef) {\n console.log('Build -1')\n }\n \n ngOnInit(): void {\n if (this.contentCapture) {\n console.log('Content capture is enabled.');\n } else {\n console.log('Content capture is disabled.');\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['height'] || changes['width']) {\n this.applyDimensions();\n }\n }\n\n private applyDimensions(): void {\n const editorElement = this.elRef.nativeElement.querySelector('.dimension');\n if (this.height) {\n this.renderer.setStyle(editorElement, 'height', this.height);\n }\n if (this.width) {\n this.renderer.setStyle(editorElement, 'width', this.width);\n }\n }\n\n ngAfterViewInit(): void {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (!editor) {\n console.error('Editor element not found.');\n }\n }\n\n \n\n onContentChange(): void {\n if (this.contentCapture) {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (editor) {\n this.editorContent = editor.innerHTML;\n console.log('Captured Content (Child):', this.editorContent);\n this.contentChange.emit(this.editorContent);\n } else {\n console.error('Editor element not found.');\n }\n }\n }\n\n \n\n getContent(): string {\n return this.editorContent;\n }\n\n //Two Way Data Binding Functionality\n\n private onChange = (content: string) => {};\n private onTouched = () => {};\n\n // Called by Angular to update the value programmatically\n writeValue(content: string): void {\n if (this.editor && this.editor.nativeElement) {\n this.editor.nativeElement.innerHTML = content || '';\n }\n }\n\n // Registers the onChange callback to notify Angular of content changes\n registerOnChange(fn: (content: string) => void): void {\n this.onChange = fn;\n }\n\n // Registers the onTouched callback for blur events\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n\n onBlur() {\n this.onTouched();\n }\n\n\n\n format(command: string): void {\n document.execCommand(command, false, '');\n }\n\n setHeading(event: Event): void {\n const value = (event.target as HTMLSelectElement).value;\n document.execCommand('formatBlock', false, value);\n }\n\n //Image Section\n \n allowDrop(event: DragEvent): void {\n event.preventDefault(); \n }\n\n // Handle image drag start\n drag(event: DragEvent, imageUrl: string): void {\n event.dataTransfer?.setData(\"text\", imageUrl); \n }\n\n // Handle drop event in the editor\n drop(event: DragEvent): void {\n event.preventDefault(); \n const imageUrl = event.dataTransfer?.getData(\"text\"); \n if (imageUrl) {\n this.insertImageInEditor(imageUrl); \n }\n }\n\n // insertImage(event: any): void {\n // const files: FileList = event.target.files;\n \n // if (!files || files.length === 0) {\n // console.error('No files selected.');\n // return;\n // }\n \n // Array.from(files).forEach((file) => {\n // // Check file type\n // if (file.type !== 'image/png' && !file.type.startsWith('image/')) {\n // console.error('Unsupported file type:', file.type);\n // return;\n // }\n \n // // Read the image file\n // const reader = new FileReader();\n // reader.onload = (e: any) => {\n // const imageUrl = e.target.result;\n \n // // Add image to the uploaded images list\n // this.uploadedImages.push(imageUrl);\n \n // // Call insertImageInEditor to add the image to the editor\n // this.insertImageInEditor(imageUrl);\n // };\n // reader.readAsDataURL(file);\n // });\n // } -> for PNG\n\n removeImage(index: number): void {\n this.uploadedImages.splice(index, 1);\n }\n \n insertImageInEditor(imageUrl: string): void {\n const editor = document.querySelector('.editor') as HTMLElement;\n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n // Create image element\n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n \n // Create a wrapper around the image to allow resizing\n const wrapper = document.createElement('div');\n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block'; // Ensures the wrapper only takes up space for the image\n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.border = '1px dashed #ccc'; // Optional border to indicate the image area\n \n // Append the image to the wrapper\n wrapper.appendChild(img);\n \n // Append the wrapper to the editor\n editor.appendChild(wrapper);\n \n // Make the image resizable\n this.makeImageResizable(wrapper, img);\n \n // Optionally, add a text node to maintain cursor position after appending the image\n const textNode = document.createTextNode('\\u200B'); // Invisible character to maintain position\n editor.appendChild(textNode);\n \n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n \n makeImageResizable(wrapper: HTMLElement, img: HTMLImageElement): void {\n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n // Create resize handles for the image\n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n // Add resizing handles to the wrapper for the image\n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n }\n \n\n insertImage(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (input?.files) {\n Array.from(input.files).forEach(file => {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n this.uploadedImages.push(imageUrl); // Store image URL in the array\n };\n reader.readAsDataURL(file);\n });\n }\n }\n \n\n convertImage(file: File): Promise<File> {\n return new Promise((resolve, reject) => {\n if (file.type !== 'image/png') {\n resolve(file); // Return the original file if it's not a PNG\n return;\n }\n \n const img = new Image();\n const reader = new FileReader();\n \n reader.onload = (e: any) => {\n img.src = e.target.result;\n \n img.onload = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n \n if (!ctx) {\n reject(new Error('Failed to get canvas context'));\n return;\n }\n \n canvas.width = img.width;\n canvas.height = img.height;\n \n ctx.drawImage(img, 0, 0);\n canvas.toBlob(\n blob => {\n if (blob) {\n const jpgFile = new File([blob], file.name.replace(/\\.png$/, '.jpg'), { type: 'image/jpeg' });\n resolve(jpgFile);\n } else {\n reject(new Error('Failed to convert PNG to JPG'));\n }\n },\n 'image/jpeg',\n 0.95 // Quality factor for JPEG\n );\n };\n };\n \n reader.onerror = () => reject(new Error('Failed to read the file'));\n reader.readAsDataURL(file);\n });\n }\n \n \n \n\n // insertImageByDrag(imageUrl: string): void {\n // const editor = document.querySelector('.editor') as HTMLElement;\n // if (!editor) {\n // console.error('Editor element not found.');\n // return;\n // }\n\n // const img = document.createElement('img');\n // img.src = imageUrl;\n // img.style.maxWidth = '100%';\n // img.style.display = 'block';\n // img.style.width = '300px'; \n // img.style.height = 'auto';\n\n // editor.appendChild(img);\n // }\n \n\n insertImageToEditor(event: any): void {\n const file = event.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n const editor = document.querySelector('.editor') as HTMLElement;\n \n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n \n const wrapper = document.createElement('div');\n wrapper.contentEditable = 'false'; \n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block';\n wrapper.style.border = '1px dashed #ccc'; \n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.borderBlockColor = '#007BFF';\n \n \n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n wrapper.appendChild(img);\n \n \n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n \n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n \n \n editor.appendChild(wrapper);\n \n \n const textNode = document.createTextNode('\\u200B'); \n editor.appendChild(textNode);\n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n };\n reader.readAsDataURL(file);\n }\n }\n \n \n\n \n\n\n openTableDialog(event: MouseEvent): void {\n this.rows = 1; \n this.cols = 1;\n\n const dialogRef = this.dialog.open(this.tableDialog, {\n position: {\n top: `${event.clientY}px`,\n left: `${event.clientX}px`,\n },\n panelClass: 'custom-dialog-container'\n });\n\n dialogRef.afterClosed().subscribe((result) => {\n if (result) {\n this.insertTable(result.rows, result.cols);\n }\n });\n }\n\n updatePreview(cols: number, rows: number) {\n this.cols = cols;\n this.rows = rows;\n }\n\n updateSelection(colIndex: number, rowIndex: number, dialogRef: any) {\n this.cols = colIndex;\n this.rows = rowIndex;\n dialogRef.close({ rows: this.rows, cols: this.cols }); // Close dialog with selection\n }\n \n \n\n makeFirstRowHeader(): void {\n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Check if selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n alert('Please place the cursor inside the table to make the first row a header.');\n return;\n }\n \n // Find the closest table to the selection\n const range = selection.getRangeAt(0);\n const selectedNode = range.startContainer;\n const table = this.findClosestTable(selectedNode);\n \n if (!table) {\n alert('No table found near the cursor.');\n return;\n }\n \n // Convert the first row cells to header cells\n const firstRow = table.rows[0];\n if (firstRow) {\n for (let i = 0; i < firstRow.cells.length; i++) {\n const cell = firstRow.cells[i];\n const th = document.createElement('th');\n th.innerHTML = cell.innerHTML;\n th.style.textAlign = 'center';\n th.style.backgroundColor = '#F1F1F0';\n th.style.border = '1px solid black';\n th.style.borderCollapse = 'collapse';\n th.style.padding = window.getComputedStyle(cell).padding; // Retain padding\n th.style.width = window.getComputedStyle(cell).width; // Retain width\n th.style.height = window.getComputedStyle(cell).height;\n firstRow.replaceChild(th, cell);\n }\n }\n \n editor.focus();\n }\n \n private findClosestTable(node: Node): HTMLTableElement | null {\n while (node && node !== document) {\n if (node.nodeName === 'TABLE') {\n return node as HTMLTableElement;\n }\n node = node.parentNode!;\n }\n return null;\n }\n \n \n insertTable(rows: string, cols: string): void {\n const rowCount = parseInt(rows, 10);\n const colCount = parseInt(cols, 10);\n \n if (isNaN(rowCount) || isNaN(colCount) || rowCount < 1 || colCount < 1) {\n alert('Please enter valid numbers for rows and columns.');\n return;\n }\n \n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Ensure selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n // Append the table at the end if selection is outside editor\n this.appendTable(editor, rowCount, colCount);\n return;\n }\n \n // Proceed to insert the table if selection is valid\n const tableHTML = this.createTableHTML(rowCount, colCount);\n const range = selection.getRangeAt(0);\n range.deleteContents(); // Remove any selected content\n \n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = tableHTML;\n \n range.insertNode(tempDiv.firstChild!); // Insert the table\n \n // Move the cursor to the first cell of the new table\n this.setCursorToFirstCell(tempDiv.firstChild as HTMLElement);\n editor.focus();\n }\n \n // Helper function: Create table HTML\n private createTableHTML(rowCount: number, colCount: number): string {\n let tableHTML = '<table border=\"1\" style=\"border-collapse: collapse; margin:5px\">';\n for (let i = 0; i < rowCount; i++) {\n tableHTML += '<tr>';\n for (let j = 0; j < colCount; j++) {\n tableHTML += `<td style=\"font-size: 14px; min-width: 1.5em; height: 2em; padding: .4em; border: 1px solid black\" \n role=\"textbox\" contenteditable=\"true\"></td>`;\n }\n tableHTML += '</tr>';\n }\n tableHTML += '</table>';\n return tableHTML;\n }\n \n \n // Helper function: Append a table at the end of the editor\n private appendTable(editor: HTMLElement, rowCount: number, colCount: number): void {\n const tableHTML = this.createTableHTML(rowCount, colCount);\n editor.innerHTML += tableHTML;\n \n // Set cursor inside the first cell of the new table\n const lastInsertedTable = editor.querySelector('table:last-child') as HTMLElement;\n this.setCursorToFirstCell(lastInsertedTable);\n editor.focus();\n }\n \n // Helper function: Check if selection is inside the editor\n private isSelectionInsideEditor(editor: HTMLElement, selection: Selection): boolean {\n if (!selection.rangeCount) return false;\n let node = selection.getRangeAt(0).commonAncestorContainer;\n \n // Traverse up to see if the node belongs to the editor\n while (node) {\n if (node === editor) return true;\n node = node.parentNode!;\n }\n return false;\n }\n \n // Helper function: Move cursor to the first cell\n // private setCursorToFirstCell(table: HTMLElement) {\n // const firstCell = table.querySelector('tr:first-child td:first-child') as HTMLElement;\n \n // if (firstCell) {\n // const newRange = document.createRange();\n // newRange.setStart(firstCell, 0); // Start at the beginning of the cell\n // newRange.collapse(true);\n \n // const selection = window.getSelection();\n // selection!.removeAllRanges();\n // selection!.addRange(newRange);\n // }\n // }\n\n private setCursorToFirstCell(table: HTMLElement): void {\n const firstCell = table.querySelector('tr:first-child td:first-child, tr:first-child th:first-child') as HTMLElement;\n\n if (firstCell) {\n // Ensure the cell is contenteditable\n firstCell.setAttribute('contenteditable', 'true');\n\n // Focus the cell\n firstCell.focus();\n\n // Create a range and place the cursor at the start of the cell\n const newRange = document.createRange();\n newRange.selectNodeContents(firstCell); // Select the contents of the cell\n newRange.collapse(true); // Collapse to the start\n\n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n }\n }\n\n \n \n\n insertPageBreak(): void {\n const pageBreak = `<div style=\"page-break-after: always;\"><br /></div>`;\n document.execCommand('insertHTML', false, pageBreak);\n }\n\n submitContent(): void {\n const editor = this.editor.nativeElement;\n const content = editor.innerHTML; // Get the HTML content from the editor\n const plainTextContent = editor.innerText; // Optionally, get plain text content\n\n // For demonstration, you can log it or process it as needed\n this.onChange(content);\n\n // Example: You could send this data to a server or use it elsewhere in your application\n // this.yourService.submitContent({ content }); // Replace with your service call\n }\n\n}\n","<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ","import { NgModule } from '@angular/core';\nimport { RapidTextEditorComponent } from './rapid-text-editor.component';\n\n//Mat Modules\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [\n RapidTextEditorComponent\n ],\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule\n ],\n exports: [\n RapidTextEditorComponent\n ]\n})\nexport class RapidTextEditorModule { }\n","/*\n * Public API Surface of rapid-text-editor\n */\n\nexport * from './lib/rapid-text-editor.service';\nexport * from './lib/rapid-text-editor.component';\nexport * from './lib/rapid-text-editor.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAKa,sBAAsB,CAAA;AAEjC,IAAA,WAAA,GAAA,GAAiB;;oHAFN,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QA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A,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAVvB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,aAAa;YACb,eAAe;YACf,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAKU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;AACzB,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"rapid-text-editor.mjs","sources":["../../../projects/rapid-text-editor/src/lib/rapid-text-editor.service.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.ts","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.component.html","../../../projects/rapid-text-editor/src/lib/rapid-text-editor.module.ts","../../../projects/rapid-text-editor/src/public-api.ts","../../../projects/rapid-text-editor/src/rapid-text-editor.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RapidTextEditorService {\n\n constructor() { }\n}\n","import { Component, ElementRef, Input, Output, OnInit, ViewChild, OnChanges, TemplateRef, forwardRef, EventEmitter, AfterViewInit, SimpleChange, SimpleChanges, Renderer2} from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'rapid-text-editor',\n templateUrl: './rapid-text-editor.component.html',\n styleUrls: ['./rapid-text-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RapidTextEditorComponent),\n multi: true\n }\n ]\n \n})\nexport class RapidTextEditorComponent implements ControlValueAccessor, OnInit, AfterViewInit, OnChanges {\n\n\n @Input() contentCapture: boolean = false;\n @Input() height: string = \"300px\";\n @Input() width: string = \"auto\";\n @Output() contentChange = new EventEmitter<string>();\n @ViewChild('editor', { static: true }) editor!: ElementRef;\n @ViewChild('tableDialog') tableDialog!: TemplateRef<any>;\n private editorContent: string = '';\n rows: number = 1;\n cols: number = 1;\n grid = Array(49).fill(0);\n Math = Math;\n uploadedImages: string[] = [];\n\n\n\n constructor(private dialog: MatDialog, private el: ElementRef,private renderer: Renderer2, private elRef: ElementRef) {\n console.log('Build -1')\n }\n \n ngOnInit(): void {\n if (this.contentCapture) {\n console.log('Content capture is enabled.');\n } else {\n console.log('Content capture is disabled.');\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['height'] || changes['width']) {\n this.applyDimensions();\n }\n }\n\n private applyDimensions(): void {\n const editorElement = this.elRef.nativeElement.querySelector('.dimension');\n if (this.height) {\n this.renderer.setStyle(editorElement, 'height', this.height);\n }\n if (this.width) {\n this.renderer.setStyle(editorElement, 'width', this.width);\n }\n }\n\n ngAfterViewInit(): void {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (!editor) {\n console.error('Editor element not found.');\n }\n }\n\n \n\n onContentChange(): void {\n if (this.contentCapture) {\n const editor = this.el.nativeElement.querySelector('.editor');\n if (editor) {\n this.editorContent = editor.innerHTML;\n console.log('Captured Content (Child):', this.editorContent);\n this.contentChange.emit(this.editorContent);\n } else {\n console.error('Editor element not found.');\n }\n }\n }\n\n \n\n getContent(): string {\n return this.editorContent;\n }\n\n //Two Way Data Binding Functionality\n\n private onChange = (content: string) => {};\n private onTouched = () => {};\n\n // Called by Angular to update the value programmatically\n writeValue(content: string): void {\n if (this.editor && this.editor.nativeElement) {\n this.editor.nativeElement.innerHTML = content || '';\n }\n }\n\n // Registers the onChange callback to notify Angular of content changes\n registerOnChange(fn: (content: string) => void): void {\n this.onChange = fn;\n }\n\n // Registers the onTouched callback for blur events\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n\n onBlur() {\n this.onTouched();\n }\n\n\n\n format(command: string): void {\n document.execCommand(command, false, '');\n }\n\n setHeading(event: Event): void {\n const value = (event.target as HTMLSelectElement).value;\n document.execCommand('formatBlock', false, value);\n }\n\n //Image Section\n \n allowDrop(event: DragEvent): void {\n event.preventDefault(); \n }\n\n // Handle image drag start\n drag(event: DragEvent, imageUrl: string): void {\n event.dataTransfer?.setData(\"text\", imageUrl); \n }\n\n // Handle drop event in the editor\n drop(event: DragEvent): void {\n event.preventDefault(); \n const imageUrl = event.dataTransfer?.getData(\"text\"); \n if (imageUrl) {\n this.insertImageInEditor(imageUrl); \n }\n }\n\n // insertImage(event: any): void {\n // const files: FileList = event.target.files;\n \n // if (!files || files.length === 0) {\n // console.error('No files selected.');\n // return;\n // }\n \n // Array.from(files).forEach((file) => {\n // // Check file type\n // if (file.type !== 'image/png' && !file.type.startsWith('image/')) {\n // console.error('Unsupported file type:', file.type);\n // return;\n // }\n \n // // Read the image file\n // const reader = new FileReader();\n // reader.onload = (e: any) => {\n // const imageUrl = e.target.result;\n \n // // Add image to the uploaded images list\n // this.uploadedImages.push(imageUrl);\n \n // // Call insertImageInEditor to add the image to the editor\n // this.insertImageInEditor(imageUrl);\n // };\n // reader.readAsDataURL(file);\n // });\n // } -> for PNG\n\n removeImage(index: number): void {\n this.uploadedImages.splice(index, 1);\n }\n \n insertImageInEditor(imageUrl: string): void {\n const editor = document.querySelector('.editor') as HTMLElement;\n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n // Create image element\n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n \n // Create a wrapper around the image to allow resizing\n const wrapper = document.createElement('div');\n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block'; // Ensures the wrapper only takes up space for the image\n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.border = '1px dashed #ccc'; // Optional border to indicate the image area\n \n // Append the image to the wrapper\n wrapper.appendChild(img);\n \n // Append the wrapper to the editor\n editor.appendChild(wrapper);\n \n // Make the image resizable\n this.makeImageResizable(wrapper, img);\n \n // Optionally, add a text node to maintain cursor position after appending the image\n const textNode = document.createTextNode('\\u200B'); // Invisible character to maintain position\n editor.appendChild(textNode);\n \n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n \n makeImageResizable(wrapper: HTMLElement, img: HTMLImageElement): void {\n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n // Create resize handles for the image\n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n // Add resizing handles to the wrapper for the image\n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n }\n \n\n insertImage(event: Event): void {\n const input = event.target as HTMLInputElement;\n if (input?.files) {\n Array.from(input.files).forEach(file => {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n this.uploadedImages.push(imageUrl); // Store image URL in the array\n };\n reader.readAsDataURL(file);\n });\n }\n }\n \n\n convertImage(file: File): Promise<File> {\n return new Promise((resolve, reject) => {\n if (file.type !== 'image/png') {\n resolve(file); // Return the original file if it's not a PNG\n return;\n }\n \n const img = new Image();\n const reader = new FileReader();\n \n reader.onload = (e: any) => {\n img.src = e.target.result;\n \n img.onload = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n \n if (!ctx) {\n reject(new Error('Failed to get canvas context'));\n return;\n }\n \n canvas.width = img.width;\n canvas.height = img.height;\n \n ctx.drawImage(img, 0, 0);\n canvas.toBlob(\n blob => {\n if (blob) {\n const jpgFile = new File([blob], file.name.replace(/\\.png$/, '.jpg'), { type: 'image/jpeg' });\n resolve(jpgFile);\n } else {\n reject(new Error('Failed to convert PNG to JPG'));\n }\n },\n 'image/jpeg',\n 0.95 // Quality factor for JPEG\n );\n };\n };\n \n reader.onerror = () => reject(new Error('Failed to read the file'));\n reader.readAsDataURL(file);\n });\n }\n \n \n \n\n // insertImageByDrag(imageUrl: string): void {\n // const editor = document.querySelector('.editor') as HTMLElement;\n // if (!editor) {\n // console.error('Editor element not found.');\n // return;\n // }\n\n // const img = document.createElement('img');\n // img.src = imageUrl;\n // img.style.maxWidth = '100%';\n // img.style.display = 'block';\n // img.style.width = '300px'; \n // img.style.height = 'auto';\n\n // editor.appendChild(img);\n // }\n \n\n insertImageToEditor(event: any): void {\n const file = event.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.onload = (e: any) => {\n const imageUrl = e.target.result;\n const editor = document.querySelector('.editor') as HTMLElement;\n \n if (!editor) {\n console.error('Editor element not found.');\n return;\n }\n \n \n const wrapper = document.createElement('div');\n wrapper.contentEditable = 'false'; \n wrapper.style.position = 'relative';\n wrapper.style.display = 'inline-block';\n wrapper.style.border = '1px dashed #ccc'; \n wrapper.style.margin = '10px';\n wrapper.style.padding = '5px';\n wrapper.style.borderBlockColor = '#007BFF';\n \n \n const img = document.createElement('img');\n img.src = imageUrl;\n img.style.maxWidth = '100%';\n img.style.display = 'block';\n img.style.width = '300px'; \n img.style.height = 'auto';\n wrapper.appendChild(img);\n \n \n let isResizing = false;\n let startX = 0;\n let startY = 0;\n let startWidth = 0;\n let startHeight = 0;\n \n const createResizeHandle = (\n cursor: string,\n positionStyles: Record<string, string>,\n resizeCallback: (deltaX: number, deltaY: number) => void\n ) => {\n const handle = document.createElement('div');\n handle.style.position = 'absolute';\n handle.style.width = '10px';\n handle.style.height = '10px';\n handle.style.background = 'rgba(0, 0, 0, 0.5)';\n handle.style.cursor = cursor;\n Object.assign(handle.style, positionStyles);\n \n handle.addEventListener('mousedown', (resizeEvent) => {\n isResizing = true;\n startX = resizeEvent.clientX;\n startY = resizeEvent.clientY;\n startWidth = img.offsetWidth;\n startHeight = img.offsetHeight;\n \n const onMouseMove = (moveEvent: MouseEvent) => {\n if (isResizing) {\n const deltaX = moveEvent.clientX - startX;\n const deltaY = moveEvent.clientY - startY;\n resizeCallback(deltaX, deltaY);\n }\n };\n \n const onMouseUp = () => {\n isResizing = false;\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n \n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n });\n \n wrapper.appendChild(handle);\n };\n \n \n createResizeHandle(\n 'nw-resize',\n { top: '-5px', left: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth - deltaX}px`;\n img.style.height = `${startHeight - deltaY}px`;\n }\n );\n createResizeHandle(\n 'se-resize',\n { bottom: '-5px', right: '-5px' },\n (deltaX, deltaY) => {\n img.style.width = `${startWidth + deltaX}px`;\n img.style.height = `${startHeight + deltaY}px`;\n }\n );\n \n \n editor.appendChild(wrapper);\n \n \n const textNode = document.createTextNode('\\u200B'); \n editor.appendChild(textNode);\n const range = document.createRange();\n range.setStartAfter(wrapper);\n range.collapse(true);\n \n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n };\n reader.readAsDataURL(file);\n }\n }\n \n \n\n \n\n\n openTableDialog(event: MouseEvent): void {\n this.rows = 1; \n this.cols = 1;\n\n const dialogRef = this.dialog.open(this.tableDialog, {\n position: {\n top: `${event.clientY}px`,\n left: `${event.clientX}px`,\n },\n panelClass: 'custom-dialog-container'\n });\n\n dialogRef.afterClosed().subscribe((result) => {\n if (result) {\n this.insertTable(result.rows, result.cols);\n }\n });\n }\n\n updatePreview(cols: number, rows: number) {\n this.cols = cols;\n this.rows = rows;\n }\n\n updateSelection(colIndex: number, rowIndex: number, dialogRef: any) {\n this.cols = colIndex;\n this.rows = rowIndex;\n dialogRef.close({ rows: this.rows, cols: this.cols }); // Close dialog with selection\n }\n \n \n\n makeFirstRowHeader(): void {\n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Check if selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n alert('Please place the cursor inside the table to make the first row a header.');\n return;\n }\n \n // Find the closest table to the selection\n const range = selection.getRangeAt(0);\n const selectedNode = range.startContainer;\n const table = this.findClosestTable(selectedNode);\n \n if (!table) {\n alert('No table found near the cursor.');\n return;\n }\n \n // Convert the first row cells to header cells\n const firstRow = table.rows[0];\n if (firstRow) {\n for (let i = 0; i < firstRow.cells.length; i++) {\n const cell = firstRow.cells[i];\n const th = document.createElement('th');\n th.innerHTML = cell.innerHTML;\n th.style.textAlign = 'center';\n th.style.backgroundColor = '#F1F1F0';\n th.style.border = '1px solid black';\n th.style.borderCollapse = 'collapse';\n th.style.padding = window.getComputedStyle(cell).padding; // Retain padding\n th.style.width = window.getComputedStyle(cell).width; // Retain width\n th.style.height = window.getComputedStyle(cell).height;\n firstRow.replaceChild(th, cell);\n }\n }\n \n editor.focus();\n }\n \n private findClosestTable(node: Node): HTMLTableElement | null {\n while (node && node !== document) {\n if (node.nodeName === 'TABLE') {\n return node as HTMLTableElement;\n }\n node = node.parentNode!;\n }\n return null;\n }\n \n \n insertTable(rows: string, cols: string): void {\n const rowCount = parseInt(rows, 10);\n const colCount = parseInt(cols, 10);\n \n if (isNaN(rowCount) || isNaN(colCount) || rowCount < 1 || colCount < 1) {\n alert('Please enter valid numbers for rows and columns.');\n return;\n }\n \n const editor = this.editor.nativeElement;\n const selection = window.getSelection();\n \n // Ensure selection is inside the editor\n if (!this.isSelectionInsideEditor(editor, selection)) {\n // Append the table at the end if selection is outside editor\n this.appendTable(editor, rowCount, colCount);\n return;\n }\n \n // Proceed to insert the table if selection is valid\n const tableHTML = this.createTableHTML(rowCount, colCount);\n const range = selection.getRangeAt(0);\n range.deleteContents(); // Remove any selected content\n \n const tempDiv = document.createElement('div');\n tempDiv.innerHTML = tableHTML;\n \n range.insertNode(tempDiv.firstChild!); // Insert the table\n \n // Move the cursor to the first cell of the new table\n this.setCursorToFirstCell(tempDiv.firstChild as HTMLElement);\n editor.focus();\n }\n \n // Helper function: Create table HTML\n private createTableHTML(rowCount: number, colCount: number): string {\n let tableHTML = '<table border=\"1\" style=\"border-collapse: collapse; margin:5px\">';\n for (let i = 0; i < rowCount; i++) {\n tableHTML += '<tr>';\n for (let j = 0; j < colCount; j++) {\n tableHTML += `<td style=\"font-size: 14px; min-width: 1.5em; height: 2em; padding: .4em; border: 1px solid black\" \n role=\"textbox\" contenteditable=\"true\"></td>`;\n }\n tableHTML += '</tr>';\n }\n tableHTML += '</table>';\n return tableHTML;\n }\n \n \n // Helper function: Append a table at the end of the editor\n private appendTable(editor: HTMLElement, rowCount: number, colCount: number): void {\n const tableHTML = this.createTableHTML(rowCount, colCount);\n editor.innerHTML += tableHTML;\n \n // Set cursor inside the first cell of the new table\n const lastInsertedTable = editor.querySelector('table:last-child') as HTMLElement;\n this.setCursorToFirstCell(lastInsertedTable);\n editor.focus();\n }\n \n // Helper function: Check if selection is inside the editor\n private isSelectionInsideEditor(editor: HTMLElement, selection: Selection): boolean {\n if (!selection.rangeCount) return false;\n let node = selection.getRangeAt(0).commonAncestorContainer;\n \n // Traverse up to see if the node belongs to the editor\n while (node) {\n if (node === editor) return true;\n node = node.parentNode!;\n }\n return false;\n }\n \n // Helper function: Move cursor to the first cell\n // private setCursorToFirstCell(table: HTMLElement) {\n // const firstCell = table.querySelector('tr:first-child td:first-child') as HTMLElement;\n \n // if (firstCell) {\n // const newRange = document.createRange();\n // newRange.setStart(firstCell, 0); // Start at the beginning of the cell\n // newRange.collapse(true);\n \n // const selection = window.getSelection();\n // selection!.removeAllRanges();\n // selection!.addRange(newRange);\n // }\n // }\n\n private setCursorToFirstCell(table: HTMLElement): void {\n const firstCell = table.querySelector('tr:first-child td:first-child, tr:first-child th:first-child') as HTMLElement;\n\n if (firstCell) {\n // Ensure the cell is contenteditable\n firstCell.setAttribute('contenteditable', 'true');\n\n // Focus the cell\n firstCell.focus();\n\n // Create a range and place the cursor at the start of the cell\n const newRange = document.createRange();\n newRange.selectNodeContents(firstCell); // Select the contents of the cell\n newRange.collapse(true); // Collapse to the start\n\n const selection = window.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n }\n }\n\n \n \n\n insertPageBreak(): void {\n const pageBreak = `<div style=\"page-break-after: always;\"><br /></div>`;\n document.execCommand('insertHTML', false, pageBreak);\n }\n\n submitContent(): void {\n const editor = this.editor.nativeElement;\n const content = editor.innerHTML; // Get the HTML content from the editor\n const plainTextContent = editor.innerText; // Optionally, get plain text content\n\n // For demonstration, you can log it or process it as needed\n this.onChange(content);\n\n // Example: You could send this data to a server or use it elsewhere in your application\n // this.yourService.submitContent({ content }); // Replace with your service call\n }\n\n}\n","<link rel=\"stylesheet\" href=\"../lib/rapid-text-editor.component.scss\">\r\n<div class=\"dimension\">\r\n\r\n\r\n <div class=\"rich-text-editor\">\r\n <!-- Toolbar -->\r\n <div class=\"toolbar\">\r\n \r\n <select class=\"select-wrapper\" (change)=\"setHeading($event)\">\r\n <option value=\"P\">Paragraph</option>\r\n <option value=\"H1\">H1</option>\r\n <option value=\"H2\">H2</option>\r\n <option value=\"H3\">H3</option>\r\n <option value=\"H4\">H4</option>\r\n <option value=\"H5\">H5</option>\r\n <option value=\"H6\">H6</option>\r\n </select>\r\n <button (click)=\"format('bold')\" aria-label=\"Bold\">\r\n <mat-icon>format_bold</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('italic')\" aria-label=\"Italic\">\r\n <mat-icon>format_italic</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('underline')\" aria-label=\"Underline\">\r\n <mat-icon>format_underline</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('strikethrough')\" aria-label=\"Strikethrough\">\r\n <mat-icon>strikethrough_s</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyLeft')\" aria-label=\"Align Left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyCenter')\" aria-label=\"Center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyRight')\" aria-label=\"Align Right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('justifyFull')\" aria-label=\"Justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertUnorderedList')\" aria-label=\"Unordered List\">\r\n <mat-icon>format_list_bulleted</mat-icon>\r\n </button>\r\n \r\n <button (click)=\"format('insertOrderedList')\" aria-label=\"Ordered List\">\r\n <mat-icon>format_list_numbered</mat-icon>\r\n </button>\r\n \r\n \r\n \r\n <button color=\"secondary\" aria-label=\"Insert Image\" style=\"position: relative; display: inline-flex; align-items: center; justify-content: center;\">\r\n <input\r\n type=\"file\" \r\n (change)=\"insertImageToEditor($event)\"\r\n style=\"position: absolute; left: -50%; top: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;\"\r\n aria-hidden=\"true\" \r\n />\r\n \r\n <mat-icon style=\"pointer-events: none;\">insert_photo_outlined</mat-icon>\r\n </button>\r\n \r\n \r\n <button (click)=\"openTableDialog($event)\" color=\"secondary\" aria-label=\"Choose table rows and columns\">\r\n <mat-icon >border_all</mat-icon>\r\n </button>\r\n \r\n <button class=\"ms-1\" style=\"all: unset;margin-bottom: 6px;\" (click)=\"makeFirstRowHeader()\" color=\"secondary\" aria-label=\"Make Header\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20px\" viewBox=\"0 -960 960 960\" width=\"20px\" fill=\"#6C757D\"><path d=\"M120-760v-80h720v80H120Zm640 80q33 0 56.5 23.5T840-600v400q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-400q0-33 23.5-56.5T200-680h560Zm0 80H200v400h560v-400Zm-560 0v400-400Z\"/></svg>\r\n </button>\r\n <!-- <mat-icon>page_header</mat-icon> -->\r\n \r\n \r\n \r\n \r\n </div>\r\n \r\n <!-- Editable Area -->\r\n <!-- (keypress)=\"onContentChange()\" need to be included -->\r\n <div class=\"editor\" id=\"editor\" contenteditable=\"true\" #editor (input)=\"submitContent()\" (blur)=\"onBlur()\" (drop)=\"drop($event)\" (dragover)=\"allowDrop($event)\" >\r\n <!-- Your content goes here --> \r\n </div>\r\n \r\n </div>\r\n \r\n <!-- <button mat-stroked-button class=\"submit\" (click)=\"submitContent()\">Submit</button> -->\r\n \r\n \r\n <ng-template #tableDialog let-dialogRef=\"dialogRef\">\r\n <h2 mat-dialog-title>Choose Table Size</h2>\r\n <mat-dialog-content>\r\n <div class=\"grid-container\">\r\n <div\r\n *ngFor=\"let cell of grid; let i = index\"\r\n [ngClass]=\"{\r\n 'grid-item': true,\r\n 'highlighted': i % 7 < cols && Math.floor(i / 7) < rows\r\n }\"\r\n (mouseenter)=\"updatePreview(i % 7 + 1, Math.floor(i / 7) + 1)\"\r\n (click)=\"updateSelection(i % 7 + 1, Math.floor(i / 7) + 1, dialogRef)\"\r\n ></div>\r\n </div>\r\n <p>{{ rows }} x {{ cols }} </p>\r\n </mat-dialog-content>\r\n </ng-template>\r\n \r\n <div>\r\n <input class=\"mt-2\" type=\"file\" placeholder=\"Upload your images here...\" (change)=\"insertImage($event)\" accept=\"image/png,image/*\" multiple />\r\n <div class=\"uploaded-images\" *ngIf=\"uploadedImages.length > 0\">\r\n <div *ngFor=\"let imageUrl of uploadedImages; let i = index\" class=\"image-preview\">\r\n <img [src]=\"imageUrl\" alt=\"Uploaded Image\" \r\n draggable=\"true\" width=\"100px\" height=\"100px\"\r\n (dragstart)=\"drag($event, imageUrl)\" />\r\n <mat-icon style=\"color: red;\r\n position: absolute\" (click)=\"removeImage(i)\">cancel</mat-icon>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n \r\n </div>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ","import { NgModule } from '@angular/core';\nimport { RapidTextEditorComponent } from './rapid-text-editor.component';\n\n//Mat Modules\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [\n RapidTextEditorComponent\n ],\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule\n ],\n exports: [\n RapidTextEditorComponent\n ]\n})\nexport class RapidTextEditorModule { }\n","/*\n * Public API Surface of rapid-text-editor\n */\n\nexport * from './lib/rapid-text-editor.service';\nexport * from './lib/rapid-text-editor.component';\nexport * from './lib/rapid-text-editor.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;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EAAA,CAAA,CAAA;oHAArB,qBAAqB,EAAA,YAAA,EAAA,CAZ9B,wBAAwB,CAAA,EAAA,OAAA,EAAA,CAGxB,YAAY;QACZ,aAAa;QACb,eAAe;AACf,QAAA,eAAe,aAGf,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAGf,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,EAVvB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,aAAa;YACb,eAAe;YACf,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;4FAKU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;AACzB,qBAAA;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapid-text-editor",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0 || 13.x",
6
6
  "@angular/core": "^13.0.0 || 13.x"