Browse Source
Merge pull request #10711 from abpframework/EngincanV/cms-kit-comment
Cms-Kit: Show the new lines on the comments
pull/10742/head
Enis Necipoglu
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
1 deletions
-
modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/CmsKit/Shared/Components/Commenting/Default.cshtml
|
|
@ -57,7 +57,16 @@ |
|
|
Func<dynamic, IHtmlContent> GetCommentContentArea(Guid id, string text) => |
|
|
Func<dynamic, IHtmlContent> GetCommentContentArea(Guid id, string text) => |
|
|
@<div class="cms-comment-content-area" data-id="@id.ToString()"> |
|
|
@<div class="cms-comment-content-area" data-id="@id.ToString()"> |
|
|
<p class="m-0"> |
|
|
<p class="m-0"> |
|
|
@text |
|
|
@{ |
|
|
|
|
|
var lines = text.SplitToLines(); |
|
|
|
|
|
if (lines.Any()) |
|
|
|
|
|
{ |
|
|
|
|
|
foreach (var line in lines) |
|
|
|
|
|
{ |
|
|
|
|
|
@line <br /> |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</p> |
|
|
</p> |
|
|
</div>; |
|
|
</div>; |
|
|
} |
|
|
} |
|
|
|