From e0c31d6fddaf2ad922f4758f83d0d8cb37d71c6e Mon Sep 17 00:00:00 2001 From: 01zulfi <85733202+01zulfi@users.noreply.github.com> Date: Wed, 7 Jan 2026 13:50:02 +0500 Subject: [PATCH 1/2] editor: fix icons not aligning in outline,task,check lists & callouts because of custom line height Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com> --- packages/editor/src/extensions/task-item/component.tsx | 6 +++--- packages/editor/styles/styles.css | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/editor/src/extensions/task-item/component.tsx b/packages/editor/src/extensions/task-item/component.tsx index 552bda7d9..89bd9baac 100644 --- a/packages/editor/src/extensions/task-item/component.tsx +++ b/packages/editor/src/extensions/task-item/component.tsx @@ -93,7 +93,7 @@ export function TaskItemComponent( cursor: "grab", mr: "0.2rem", fontFamily: "inherit", - marginTop: "0.065rem" + marginTop: "calc((1lh - 18px) / 2)" }} size={isMobile ? "2.46ch" : "2.22ch"} /> @@ -117,7 +117,7 @@ export function TaskItemComponent( borderColor: "accent" }, fontFamily: "inherit", - marginTop: "0.13rem" + marginTop: "calc((1lh - 16px) / 2)" }} onMouseDown={(e) => { if (globalThis.keyboardShown) { @@ -155,7 +155,7 @@ export function TaskItemComponent( bg: "background", opacity: 0, alignSelf: "flex-start", - marginTop: "0.16rem" + marginTop: "calc((1lh - 14px) / 2)" }} > {editor.isEditable && ( diff --git a/packages/editor/styles/styles.css b/packages/editor/styles/styles.css index 26ec1cca2..aad26cf2d 100644 --- a/packages/editor/styles/styles.css +++ b/packages/editor/styles/styles.css @@ -604,7 +604,7 @@ p > *::selection { .outline-list > li::before { position: absolute; - top: 0px; + top: calc((1lh - 18px) / 2); cursor: pointer; content: ""; background-size: 18px; @@ -729,7 +729,7 @@ p > *::selection { .simple-checklist > li::after { position: absolute; - top: 0px; + top: calc((1lh - 18px) / 2); cursor: pointer; content: ""; background-size: 18px; @@ -747,7 +747,7 @@ p > *::selection { .simple-checklist > li.checked::before { position: absolute; - top: 2px; + top: calc((1lh - 14px) / 2); cursor: pointer; content: ""; background-size: 18px; @@ -790,7 +790,7 @@ p > *::selection { .ProseMirror div.callout > :first-child::after { position: absolute; - top: 0px; + top: calc((1lh - 18px) / 2); right: 0px; cursor: pointer; content: ""; From c8cd5a4dc806360824e2381e9c753d68ac0e117c Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Wed, 14 Jan 2026 13:36:37 +0500 Subject: [PATCH 2/2] mobile: fix line height not applied to paragraphs --- packages/editor-mobile/src/components/editor.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/editor-mobile/src/components/editor.tsx b/packages/editor-mobile/src/components/editor.tsx index 1554ecaf2..689bcd3eb 100644 --- a/packages/editor-mobile/src/components/editor.tsx +++ b/packages/editor-mobile/src/components/editor.tsx @@ -882,8 +882,7 @@ const Tiptap = ({
{ editorContainer.style.padding = "0px 16px"; editorContainer.style.color = colors.primary.paragraph; editorContainer.style.fontSize = `${settings.fontSize}px`; + editorContainer.style.lineHeight = `${settings.defaultLineHeight}`; editorContainer.style.fontFamily = getFontById(settings.fontFamily)?.font || "sans-serif"; contentRef.current = editorContainer; @@ -966,8 +966,9 @@ const TiptapProvider = (): JSX.Element => { contentRef.current.style.fontSize = `${settings.fontSize}px`; contentRef.current.style.fontFamily = getFontById(settings.fontFamily)?.font || "sans-serif"; + contentRef.current.style.lineHeight = `${settings.defaultLineHeight}`; } - }, [settings.fontSize, settings.fontFamily]); + }, [settings.fontSize, settings.fontFamily, settings.defaultLineHeight]); return ; };