From b82b6ff0736b4b1543cb26b87766895d67f5a0d6 Mon Sep 17 00:00:00 2001 From: Guillaume Heurtier <guillaume.heurtier@maarch.org> Date: Mon, 4 Jan 2021 14:00:38 +0100 Subject: [PATCH] FIX #13592 TIME 2:45 fix copy paste html source code --- .../template/template-administration.component.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/frontend/app/administration/template/template-administration.component.ts b/src/frontend/app/administration/template/template-administration.component.ts index 7722ebf05e3..6bd6cf5524f 100755 --- a/src/frontend/app/administration/template/template-administration.component.ts +++ b/src/frontend/app/administration/template/template-administration.component.ts @@ -218,6 +218,14 @@ export class TemplateAdministrationComponent implements OnInit, OnDestroy { this.template.file.electronic.content = tinymce.get('templateOfficeHtml').getContent(); } }); + ed.on('change', (e: any) => { + if (this.template.type === 'HTML' && tinymce.get('templateHtml') != null) { + this.template.file.content = tinymce.get('templateHtml').getContent(); + } + if (this.template.type === 'OFFICE_HTML' && tinymce.get('templateOfficeHtml') != null) { + this.template.file.electronic.content = tinymce.get('templateOfficeHtml').getContent(); + } + }); } }); @@ -383,7 +391,7 @@ export class TemplateAdministrationComponent implements OnInit, OnDestroy { editorOptions.objectType = 'templateModification'; editorOptions.objectId = this.template.id; } - editorOptions.authToken = this.authService.getToken(), + editorOptions.authToken = this.authService.getToken(); this.launchJavaEditor(editorOptions); } else if (this.headerService.user.preferences.documentEdition !== 'java') { this.launchIntegratedEditor(editorOptions, this.headerService.user.preferences.documentEdition); -- GitLab