- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2023 09:43 AM
Hi,
I have a requirement that reduce the space between lines in HTML field.
Can someone please let me know how can achieve this.
I tried change the HTML source code from<p>text</p> to <br>text</br>, But still getting the line space for new lines.
and the HTML field data look like this
Please some one help me and I want this functionality in all HTML fields
Thanks
Theja
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2023 01:52 PM
Hi,
I found the solution for reducing line space.
Wrote below script to force HTML editor from P to br
"function onLoad() {
//Type appropriate comment here, and begin script below
addAfterPageLoadedEvent(function() {
tinymce.EditorManager.editors[0].settings.force_br_newlines = true;
tinymce.EditorManager.editors[0].settings.force_p_newlines = false;
tinymce.EditorManager.editors[0].settings.forced_root_block = "";
});
}"
Thank you for your responses.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2023 09:44 AM
Hi,
Remove the <p> and </p>tags and replace it with <br>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2023 01:05 PM
Hi Jaspal,
by replacing <p> with <br> might reduce the space, but this happens after I write the text in HTML. Please let me know where can I go and change the code to get less line space before we write(for new data entry) something in HTML.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2023 09:53 AM
<p> tag has its own specified css, so you can do one thing use like below:
testing of this story </br>
is not provided by theja </br>
text value
Don't use any tag for the content
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2023 08:30 PM
@Yamja Use line-height attribute in paragraph css to adjust the spacing between lines in a paragraph.
<p style="line-height: 0.8">
This is a paragraph with a standard line-height.<br>
The default line height in most browsers is about 110% to 120%.<br>
</p>
Hope this helps.