- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a template that has journal field and when either long text without spaces or a lengthy URL is added it messes up the formatting and goes outside the formatted template. How can I fix this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @samadam ,
I tried your problem in my PDI and it works fine for me please check below solution
I created a new Notification and a new email template and added the template to my email notification
In my Email Template I wrote below line
You can see above that there is random one big single word to handle this issue click on the code icon and add below CSS
<p style="white-space: normal; word-wrap: break-word; overflow-wrap: break-word;">bhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsjbhvbsdhjbdsjvbsdhjvbsdjhvbdshjbvdsj b jhdvh fbsdvhbds bfhsbdshj bfhsdbfhjd bfsbddf</p>
<p style="white-space: normal; word-wrap: break-word; overflow-wrap: break-word;">Your comment </p>
Result
Without CSS - you can see scroll is there
With CSS - No scroll and text break
Let me know if you have any issue!
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Missed to include that I use a Email Layout in the template that contains ${notification:body} along with a footer and header. I tried to add the style but did not work:
<p style="white-space: normal; word-wrap: break-word; overflow-wrap: break-word;"> ${notification:body}</p>
This template/layout is used by multiple notifications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Tried this and it worked:
How to fix text wrapping issues in email notifications - Support and Troubleshooting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @samadam , I also shared the same css,
word-wrap: break-word;.
You can mark multiple answer correct in servicenow community.
Thanks and Regards,
Sarthak