💄 add document share button to the markdown editor

This commit is contained in:
TC
2026-06-02 21:53:00 +10:00
parent b20cd9271f
commit cf6da58fcf
2 changed files with 38 additions and 4 deletions

View File

@@ -1025,7 +1025,17 @@ export function MarkdownEditor(): JSX.Element {
)}
{activeFilePath && (
<div className="editor-statusbar">
word {wordStats.atCursor.toLocaleString()} of {wordStats.total.toLocaleString()}
<span>word {wordStats.atCursor.toLocaleString()} of {wordStats.total.toLocaleString()}</span>
<button
className="statusbar-share-btn"
onClick={async () => {
const fileName = activeFilePath.split('/').pop()?.replace(/\.md$/, '') ?? 'document'
await window.api.exportPDF(activeFileContent, fileName)
}}
title="Export document as PDF"
>
</button>
</div>
)}
</div>