Hello All,
I was trying to add comments with line break using OOTB comments component (we-retail blog). I see that when I make a comment with line break (richtext disabled in component properties). I see the comment posted in a single line. Please see image below
I am using MSRP for UGC storage and the comment entry is stored with a '\n'. (See image)
Is this a desired behavior? I will expecting to see my comment as:
"test
another line"
instead of "test another line"
Please let me know if/how desired behavior can be achieved. (Other alternative is to allow RichText in component properties, but we will like to avoid that.)
Thanks
Shubham
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Shubham,
You can use html's <pre> tag if you want to keep the formatting without enabling rich-text. You can overlay few hbs files used by comment (component) and replace {{{message}}} with <pre> {{{message}}} </pre>
You may need to overlay the following files after updating, as mentioned above.
1. /libs/social/journal/components/hbs/entry_topic/entry_topic.hbs
2. /libs/social/journal/components/hbs/entry_topic/list-item.hbs
3. /libs/social/journal/components/hbs/comment/comment.hbs
Views
Replies
Total Likes
Hi Shubham,
You can use html's <pre> tag if you want to keep the formatting without enabling rich-text. You can overlay few hbs files used by comment (component) and replace {{{message}}} with <pre> {{{message}}} </pre>
You may need to overlay the following files after updating, as mentioned above.
1. /libs/social/journal/components/hbs/entry_topic/entry_topic.hbs
2. /libs/social/journal/components/hbs/entry_topic/list-item.hbs
3. /libs/social/journal/components/hbs/comment/comment.hbs
Views
Replies
Total Likes