Loading

Extra Line Breaks Appear in Lightning Email Template Editor When Pressing Enter

Fecha de publicación: Sep 22, 2026
Descripción

A custom Lightning email template may include <br> tags at the top of the template. When a user presses Enter/Return while editing the template, the cursor inserts a new line and jumps down below the existing <br> tags instead of behaving as expected.

Solución

This article explains how to resolve the cursor jumping below existing line breaks when editing a Lightning email template that starts with <br> tags.

Why This Happens

The Lightning email composer places the <br> tags inside a <div> element. When the user presses Enter/Return, a new <div> is created, causing the cursor to jump down below the existing line breaks.

How to Fix It

Either remove the <br> tags from the template, or replace them with empty <div> tags, as shown below:

<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div>

This code replaces each line break with an empty <div> element containing a non-breaking space, which prevents the cursor from jumping down when the user presses Enter/Return.

Número del artículo de conocimiento

004333417

 
Cargando
Salesforce Help | Article