diff --git a/front/app/src/assets/SCHLBKB.TTF b/front/app/src/assets/SCHLBKB.TTF new file mode 100644 index 00000000..cc1bfea6 Binary files /dev/null and b/front/app/src/assets/SCHLBKB.TTF differ diff --git a/front/app/src/common/crud/types/richtext.type.ts b/front/app/src/common/crud/types/richtext.type.ts index 33651ba5..7fd3d24f 100644 --- a/front/app/src/common/crud/types/richtext.type.ts +++ b/front/app/src/common/crud/types/richtext.type.ts @@ -21,25 +21,30 @@ import { FormlyFieldInput } from "@ngx-formly/bootstrap/input"; (onGetContent)="onGetContent($event)" (onBeforeAddUndo)="onBeforeAddUndo($event)" > -
+
- - - - - -
- -
- {{ props.description }} - + + + + +
+ +
+ {{ props.description }} `, }) export class RichtextTypeComponent extends FormlyFieldInput implements OnInit { multiline = true; + init_common = { + statusbar: false, + autoresize_bottom_margin: 0, + body_class: "contract-body", + content_style: ".contract-body { font-family: 'New Century Schoolbook', 'sans-serif' }" + } + init_multiline = { plugins: 'lists image imagetools table code searchreplace autoresize', menubar: 'edit insert format tools table', @@ -51,16 +56,12 @@ export class RichtextTypeComponent extends FormlyFieldInput implements OnInit { table: { title: 'Table', items: 'inserttable | cell row column | tableprops deletetable' } }, toolbar: 'undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | outdent indent bullist numlist | table image', - statusbar: false, - autoresize_bottom_margin: 0 } init_singleline = { plugins: 'autoresize', menubar: '', toolbar: 'undo redo | bold italic underline', - statusbar: false, - autoresize_bottom_margin: 0 } ngOnInit() { @@ -71,19 +72,7 @@ export class RichtextTypeComponent extends FormlyFieldInput implements OnInit { } getInitConfig() { - let result: { menubar: string, toolbar: string }; - if (this.multiline) { - result = this.init_multiline; - } else { - result = this.init_singleline; - } - - if (this.field.props.readonly) { - result.menubar = ''; - result.toolbar = '' - } - - return result; + return {...this.init_common, ...( this.multiline ? this.init_multiline : this.init_singleline)}; } onGetContent(param: any) { diff --git a/front/app/src/styles.css b/front/app/src/styles.css index 90d4ee00..70adfeab 100644 --- a/front/app/src/styles.css +++ b/front/app/src/styles.css @@ -1 +1,9 @@ /* You can add global styles to this file, and also import other style files */ +@font-face { + font-family: 'Century Schoolbook'; + src: url('assets/SCHLBKB.TTF'); +} + +.contract-body { + font-family: 'New Century Schoolbook', 'sans-serif'; +}