diff --git a/worklenz-frontend/angular.json b/worklenz-frontend/angular.json index f801bc7..46e03e9 100644 --- a/worklenz-frontend/angular.json +++ b/worklenz-frontend/angular.json @@ -36,13 +36,20 @@ "glob": "**/*", "input": "./node_modules/@ant-design/icons-angular/src/inline-svg/", "output": "/assets/" + }, + { + "glob": "**/*", + "input": "node_modules/tinymce", + "output": "/tinymce/" } ], "styles": [ "src/theme.less", "src/styles.scss" ], - "scripts": [], + "scripts": [ + "node_modules/tinymce/tinymce.min.js" + ], "serviceWorker": true, "ngswConfigPath": "ngsw-config.json", "allowedCommonJsDependencies": [ @@ -147,4 +154,4 @@ "@angular-eslint/schematics" ] } -} +} \ No newline at end of file diff --git a/worklenz-frontend/package-lock.json b/worklenz-frontend/package-lock.json index 68f2460..ebdfba0 100644 --- a/worklenz-frontend/package-lock.json +++ b/worklenz-frontend/package-lock.json @@ -36,7 +36,7 @@ "ngx-doc-viewer": "^15.0.1", "ngx-socket-io": "^4.5.1", "rxjs": "~7.4.0", - "tinymce": "^6.7.3", + "tinymce": "^6.8.3", "tslib": "^2.6.1", "zone.js": "^0.13.1" }, @@ -15327,9 +15327,9 @@ "dev": true }, "node_modules/tinymce": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.7.3.tgz", - "integrity": "sha512-J7WmYIi/gt1RvZ6Ap2oQiUjzAoiS9pfV+d4GnKuZuPu8agmlAEAInNmMvMjfCNBzHv4JnZXY7qlHUAI0IuYQVA==" + "version": "6.8.3", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.8.3.tgz", + "integrity": "sha512-3fCHKAeqT+xNwBVESf6iDbDV0VNwZNmfrkx9c/6Gz5iB8piMfaO6s7FvoiTrj1hf1gVbfyLTnz1DooI6DhgINQ==" }, "node_modules/tmp": { "version": "0.2.1", diff --git a/worklenz-frontend/package.json b/worklenz-frontend/package.json index efc47ba..c900b4f 100644 --- a/worklenz-frontend/package.json +++ b/worklenz-frontend/package.json @@ -45,7 +45,7 @@ "ngx-doc-viewer": "^15.0.1", "ngx-socket-io": "^4.5.1", "rxjs": "~7.4.0", - "tinymce": "^6.7.3", + "tinymce": "^6.8.3", "tslib": "^2.6.1", "zone.js": "^0.13.1" }, diff --git a/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.html b/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.html index a00e1f3..40662d4 100644 --- a/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.html +++ b/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.html @@ -11,7 +11,6 @@ class="description-editor" [class.editing]="isEditing" [init]="CONFIG" - [apiKey]="apiKey" [(ngModel)]="service.model.task.description" (onBlur)="onDescriptionInputBlur()" #descriptionEditor diff --git a/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.ts b/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.ts index 3c32783..a567aa9 100644 --- a/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.ts +++ b/worklenz-frontend/src/app/administrator/components/task-view/task-view-description/task-view-description.component.ts @@ -25,8 +25,9 @@ export class TaskViewDescriptionComponent implements OnInit, OnDestroy { @ViewChild("descriptionInput", {static: false}) descriptionInput!: ElementRef; @ViewChild("descriptionEditor", {static: false}) descriptionEditor!: EditorComponent; - readonly apiKey = "4nquevykvy1i0q0v62ksxuu3nz1muy8i5fsqpj3wp9qm2mgp"; readonly CONFIG = { + base_url: '/tinymce', + suffix: '.min', plugins: "lists link code wordcount", toolbar: 'blocks bold italic underline strikethrough | checklist numlist bullist link | alignleft aligncenter alignright alignjustify', menubar: false, diff --git a/worklenz-frontend/src/app/administrator/components/task-view/task-view.module.ts b/worklenz-frontend/src/app/administrator/components/task-view/task-view.module.ts index 26af0fa..249e18e 100644 --- a/worklenz-frontend/src/app/administrator/components/task-view/task-view.module.ts +++ b/worklenz-frontend/src/app/administrator/components/task-view/task-view.module.ts @@ -51,7 +51,7 @@ import {NzPopconfirmModule} from 'ng-zorro-antd/popconfirm'; import {NzCardModule} from "ng-zorro-antd/card"; import {NzTableModule} from "ng-zorro-antd/table"; import {NzProgressModule} from "ng-zorro-antd/progress"; -import {EditorModule} from '@tinymce/tinymce-angular'; +import {EditorModule, TINYMCE_SCRIPT_SRC} from '@tinymce/tinymce-angular'; import {TaskViewTimeLogComponent} from './task-view-time-log/task-view-time-log.component'; import {NzListModule} from "ng-zorro-antd/list"; import {NzEmptyModule} from "ng-zorro-antd/empty"; @@ -99,60 +99,61 @@ import {TaskCommentMentionPipe} from "@pipes/task-comment-mention.pipe"; TaskViewComponent ], providers: [ - SearchByNamePipe + SearchByNamePipe, + { provide: TINYMCE_SCRIPT_SRC, useValue: 'tinymce/tinymce.min.js' } ], - imports: [ - CommonModule, - NzDrawerModule, - NzSkeletonModule, - NzFormModule, - FormsModule, - NzInputModule, - NzSelectModule, - NzTabsModule, - NzTagModule, - NzCollapseModule, - NzDropDownModule, - AvatarsComponent, - NzAvatarModule, - NzTypographyModule, - NzCheckboxModule, - SearchByNamePipe, - NzToolTipModule, - NzDatePickerModule, - NzInputNumberModule, - NzIconModule, - NzBadgeModule, - NzDividerModule, - FromNowPipe, - ReactiveFormsModule, - TaskPriorityLabelComponent, - NzButtonModule, - NzCommentModule, - RouterLink, - NzSpaceModule, - NzMentionModule, - NzAffixModule, - NzNoAnimationModule, - NzPopconfirmModule, - NzCardModule, - NzTableModule, - NzProgressModule, - EditorModule, - NzListModule, - NzEmptyModule, - TaskTimerComponent, - FirstCharUpperPipe, - TaskListAddTaskInputComponent, - SafeStringPipe, - DateFormatterPipe, - NgxDocViewerModule, - NzModalModule, - NzSpinModule, - NzTimelineModule, - NzTimePickerModule, - TaskCommentMentionPipe - ] + imports: [ + CommonModule, + NzDrawerModule, + NzSkeletonModule, + NzFormModule, + FormsModule, + NzInputModule, + NzSelectModule, + NzTabsModule, + NzTagModule, + NzCollapseModule, + NzDropDownModule, + AvatarsComponent, + NzAvatarModule, + NzTypographyModule, + NzCheckboxModule, + SearchByNamePipe, + NzToolTipModule, + NzDatePickerModule, + NzInputNumberModule, + NzIconModule, + NzBadgeModule, + NzDividerModule, + FromNowPipe, + ReactiveFormsModule, + TaskPriorityLabelComponent, + NzButtonModule, + NzCommentModule, + RouterLink, + NzSpaceModule, + NzMentionModule, + NzAffixModule, + NzNoAnimationModule, + NzPopconfirmModule, + NzCardModule, + NzTableModule, + NzProgressModule, + EditorModule, + NzListModule, + NzEmptyModule, + TaskTimerComponent, + FirstCharUpperPipe, + TaskListAddTaskInputComponent, + SafeStringPipe, + DateFormatterPipe, + NgxDocViewerModule, + NzModalModule, + NzSpinModule, + NzTimelineModule, + NzTimePickerModule, + TaskCommentMentionPipe + ] }) export class TaskViewModule { } diff --git a/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/phase-settings-drawer/phase-settings-drawer.component.ts b/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/phase-settings-drawer/phase-settings-drawer.component.ts index ea87477..73acc77 100644 --- a/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/phase-settings-drawer/phase-settings-drawer.component.ts +++ b/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/phase-settings-drawer/phase-settings-drawer.component.ts @@ -4,7 +4,6 @@ import {ProjectTemplateService} from "@services/project-template.service"; import {PtTaskPhasesApiService} from "@api/pt-task-phases-api.service"; import {ITaskPhase} from "@interfaces/api-models/task-phase"; import {PhaseColorCodes} from "@shared/constants"; -import {load} from "@angular-devkit/build-angular/src/utils/server-rendering/esm-in-memory-file-loader"; @Component({ selector: 'worklenz-phase-settings-drawer', diff --git a/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.html b/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.html index 1d36052..93b45db 100644 --- a/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.html +++ b/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.html @@ -21,7 +21,6 @@ class="description-editor-list" [class.editing]="isEditing" [init]="CONFIG" - [apiKey]="apiKey" [(ngModel)]="task.description" (onBlur)="submit()" #descriptionEditor diff --git a/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.ts b/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.ts index 44fc17d..ba89b01 100644 --- a/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.ts +++ b/worklenz-frontend/src/app/administrator/settings/project-template-edit-view/components/row/task-description/task-description.component.ts @@ -28,8 +28,9 @@ export class TaskDescriptionComponent implements OnInit, OnDestroy { show = false; loading = false; - readonly apiKey = "4nquevykvy1i0q0v62ksxuu3nz1muy8i5fsqpj3wp9qm2mgp"; readonly CONFIG = { + base_url: '/tinymce', + suffix: '.min', plugins: "lists link code wordcount", toolbar: 'blocks bold italic underline strikethrough | checklist numlist bullist link | alignleft aligncenter alignright alignjustify', menubar: false,