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, + ); }, }, );