Skip to content

Add markdown formatter toolbar action#1675

Open
apples-kksk wants to merge 2 commits intoBoostIO:masterfrom
apples-kksk:add-markdown-formatter
Open

Add markdown formatter toolbar action#1675
apples-kksk wants to merge 2 commits intoBoostIO:masterfrom
apples-kksk:add-markdown-formatter

Conversation

@apples-kksk
Copy link
Copy Markdown

@apples-kksk apples-kksk commented May 10, 2026

Fixes #756.

Summary

  • add a toolbar action that formats the current markdown document with the existing Prettier dependency
  • support formatting the current selection when text is selected
  • preserve cursor position after formatting and avoid adding a final newline when the original text did not have one

Testing

  • npx prettier --check src/cloud/components/Editor/EditorToolbar.tsx src/cloud/lib/editor/formatMarkdown.ts src/cloud/lib/i18n/types.ts src/cloud/lib/i18n/enUS.ts src/cloud/lib/i18n/zhCN.ts src/cloud/lib/i18n/ja.ts src/cloud/lib/i18n/fr.ts typings/prettier.d.ts
  • npx eslint src/cloud/components/Editor/EditorToolbar.tsx src/cloud/lib/editor/formatMarkdown.ts src/cloud/lib/i18n/types.ts src/cloud/lib/i18n/enUS.ts src/cloud/lib/i18n/zhCN.ts src/cloud/lib/i18n/ja.ts src/cloud/lib/i18n/fr.ts typings/prettier.d.ts --ext .ts,.tsx
  • npx tsc --noEmit --pretty false

IssueHunt: https://issuehunt.io/r/BoostIO/BoostNote-App/issues/756


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce content formatter

1 participant