I need to send an Invite mail. Text will be:
Hi mate,
Join our tournament clicking this link: http://link.to.registration.with.token
First, I manage internationalization, so I get it like that:
'invite_template' => 'Hi Mate, \r\n Click the link :link ',
$message = trans('crud.invite_template', ['link' => '<a href="http://link.with.token">link</a>' ]);
And then :
{!! Form::textarea('message',nl2br(e($message)), ['class' => 'form-control']) !!}
But this is my problem:
\\r\\n
is changed to <BR />
, so Textarea looks bad Is it possible to do so???
You shall do this in 2 ways.
Method 1 : Print the text content in Text Editor
Step 1 : Include ckeditor.js
<script src="{{ asset('/').('public/lib/ckeditor/ckeditor.js') }}"></script>
And then
Step 2 : Write your text
<textarea class="ckeditor">{{ $yourTextContent }}</textarea>
Method 2 : Echo'ing the input
Just do
echo $yourContent;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.