From 09f1e55e3663cdeea4d9bfe7633dbf7401728c70 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Fri, 21 Nov 2025 15:34:27 -0500 Subject: [PATCH] count line breaks in bsky post editor as length --- app/[leaflet_id]/publish/BskyPostEditorProsemirror.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/[leaflet_id]/publish/BskyPostEditorProsemirror.tsx b/app/[leaflet_id]/publish/BskyPostEditorProsemirror.tsx index ff69b158..12af9a55 100644 --- a/app/[leaflet_id]/publish/BskyPostEditorProsemirror.tsx +++ b/app/[leaflet_id]/publish/BskyPostEditorProsemirror.tsx @@ -245,7 +245,9 @@ export function BlueskyPostEditorProsemirror(props: { view.updateState(newState); setEditorState(newState); props.editorStateRef.current = newState; - props.onCharCountChange?.(newState.doc.textContent.length); + props.onCharCountChange?.( + newState.doc.textContent.length + newState.doc.children.length - 1, + ); }, }, ); -- 2.51.2