Skip to content

feat(editor): add Prettify button to input panel#437

Open
KushalLukhi wants to merge 1 commit intoritz078:masterfrom
KushalLukhi:feat/405-add-prettify-button
Open

feat(editor): add Prettify button to input panel#437
KushalLukhi wants to merge 1 commit intoritz078:masterfrom
KushalLukhi:feat/405-add-prettify-button

Conversation

@KushalLukhi
Copy link
Copy Markdown

Summary

Add a Prettify button to the editable editor toolbar so users can format input directly in the app.

Closes #405

What changed

  • Added a Prettify toolbar button in EditorPanel (editable mode only).
  • Wired it to Monaco's built-in editor.action.formatDocument action.
  • Added optional onMount support in components/Monaco.tsx so parent components can access editor actions safely.
  • Kept result/non-editable panels unchanged (hasPrettier={false} already used there).

UX behavior

  • Clicking Prettify formats current input document in place.
  • If a formatter is unavailable for the current input type, a warning toast is shown instead of failing silently.

Notes

  • Existing behavior for copy/load/clear/settings remains unchanged.
  • This is intentionally scoped to editor UX and does not alter conversion logic.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

@KushalLukhi is attempting to deploy a commit to the ritesh-oss Team on Vercel.

A member of the Team first needs to authorize it.

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.

Add prettify functionality

1 participant