diff --git a/webapp/IronCalc/src/components/Editor/util.tsx b/webapp/IronCalc/src/components/Editor/util.tsx
index 636743f..d67611e 100644
--- a/webapp/IronCalc/src/components/Editor/util.tsx
+++ b/webapp/IronCalc/src/components/Editor/util.tsx
@@ -194,6 +194,10 @@ function getFormulaHTML(
} else {
html = [{text}];
}
+ // Add a trailing character if text ends with newline to ensure selector's height grows
+ if (text.endsWith("\n")) {
+ html.push({"\n"});
+ }
return { html, activeRanges };
}