Add ckeditor default paragraph

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@53703 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-11-09 16:43:20 +00:00
parent 586ff0485e
commit 0c27a2c17e
2 changed files with 7 additions and 15 deletions

View File

@ -59,6 +59,7 @@
<td for="email.body" class="uk-text-bold uk-text-right">Message:</td>
<td class="uk-text-left">
<ckeditor
class="form-control" [(ngModel)] = "body.paragraphs" id="message"
debounce="400"
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]', removeButtons: 'Save,NewPage,DocProps,Preview,Print',
extraPlugins: 'divarea'}">
@ -81,14 +82,6 @@
{{body.signature}}
</td>
</tr>
<!-- <tr>
<td for="email.subject" class="uk-text-bold uk-text-right">Subject :</td>
<td class="uk-text-left">
<textarea type="text"
class="form-control uk-input uk-width-large@l uk-width-medium@s" [(ngModel)] = "email.subject" id="subject">
</textarea>
</td>
</tr> -->
</tbody>
</table>
</div>
@ -138,7 +131,7 @@
</div>
</div>
</div>
<!-- <div *ngIf="longView =='false'">
<div *ngIf="longView =='false'">
<div class="uk-width-large@m uk-width-1-1@s">
<div class="uk-card uk-card-default uk-card-body">
<div class="uk-text-center uk-text-large">
@ -163,4 +156,4 @@
</div>
</div>
</div>
</div> -->
</div>

View File

@ -24,8 +24,7 @@ export class InviteComponent implements OnInit {
private ckeditorContent: string;
public defaultBody = '<div>Dear Sir/Madame,<br> <p><span>OpenAIRE invites you to subscribe in <a href=\"https://beta.egi.openaire.eu\">_Community_name_</a> dashboard. </p><p>The community dashboard is part of the <a href="https://beta.egi.openaire.eu\">OpenAIRE-Connect</a> project</p><p>Kind regards,<br>OpenAIRE team</p></div>'
public defaultBody2 = 'OpenAIRE invites you to subscribe in Community_name dashboard. </p><p>The community dashboard is part of the OpenAIRE-Connect</a> project</p>'
public defaultBody = '<p>OpenAIRE invites you to subscribe in <a href="https://beta.egi.openaire.eu">_Community_name_</a> dashboard. </p><p>The community dashboard is part of the <a href="https://beta.egi.openaire.eu">OpenAIRE-Connect</a> project.</p>';
@Input() communityId = null;
@ -39,7 +38,7 @@ export class InviteComponent implements OnInit {
public ngOnInit() {
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.body = {salutation: "Dear Sir/Madame,", fromMessage: "On behalf of ", fromName: "", paragraphs: "", closing: "Kind regards,", signature: "OpenAIRE team"};
this.body = {salutation: "Dear Sir/Madame,", fromMessage: "On behalf of ", fromName: "", paragraphs: this.defaultBody, closing: "Kind regards,", signature: "OpenAIRE team"};
this.email = {body: "", subject: "", recipients: []};
});
@ -70,8 +69,8 @@ export class InviteComponent implements OnInit {
fromMessageAndName = "<span>" + this.body.fromMessage + this.body.fromName + "</span>";
}
let formattedEmail = "<div>" + this.body.salutation + "<br>" +
"<p>" + fromMessageAndName + "..." + "</p>" +
let formattedEmail = "<div>" + this.body.salutation + "<br><br>" +
fromMessageAndName + this.body.paragraphs +
"<p>" + this.body.closing + "<br>" + this.body.signature + "</p></div>";
return formattedEmail;