Skip to content

Add markdown-preview extension #20052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JohanDevl
Copy link

@JohanDevl JohanDevl commented Jun 25, 2025

Description

This PR introduces Markdown Preview, a new Raycast extension that provides a simple and efficient way to write and preview Markdown content in real-time.

Key Features:

  • Intuitive Editor: Clean text area optimized for Markdown writing with helpful syntax examples
  • Real-time Preview: Instant rendering of Markdown content using GitHub Flavored Markdown
  • Content Statistics: Display character count, word count, and line count
  • Copy Actions: Copy original Markdown or generated HTML to clipboard
  • Keyboard Shortcuts: Efficient navigation with custom shortcuts (Cmd+Enter to preview, Cmd+Shift+K to clear, etc.)

Technical Implementation:

  • Built with TypeScript and Raycast API
  • Uses marked.js library for reliable Markdown parsing
  • Supports GitHub Flavored Markdown (tables, strikethrough, task lists, etc.)
  • Secure HTML rendering configuration
  • Clean component architecture with proper error handling

This extension is perfect for developers, writers, and anyone who works with Markdown content regularly and needs a quick way to preview their formatting without leaving Raycast.

Screencast

markdown-preview-1
markdown-preview-2
markdown-preview-3

Checklist

- Enhance package.json with a detailed description for the Preview Markdown tool, and add new metadata images for improved user experience while removing outdated preview images.
- Update package.json to replace "Text" category with "Developer Tools" and "Documentation" for improved categorization.
- Update CHANGELOG for version 1.0.0, replace main icon with new md-preview-icon, and add metadata preview images for enhanced user experience.
- Refactor MarkdownInput component in preview-markdown.tsx to enhance user guidance by updating the title and info attributes, while simplifying the placeholder text for better clarity.
- Update icon in package.json, modify README for keyboard shortcuts, and refactor MarkdownEditor to MarkdownInput in preview-markdown.tsx for improved clarity and functionality.
- Update README and preview-markdown.tsx with new keyboard shortcuts for editor and preview modes. Added commands for toggling inline preview and full screen preview, and adjusted shortcut for toggling preview mode.
- Initialize Markdown Preview Raycast extension with essential files and configurations. Added .gitignore, .prettierrc, CHANGELOG, ESLint configuration, package.json, and README. Implemented core functionality in preview-markdown.tsx for real-time Markdown editing and previewing.
@raycastbot raycastbot added the new extension Label for PRs with new extensions label Jun 25, 2025
@raycastbot
Copy link
Collaborator

Congratulations on your new Raycast extension! 🚀

You can expect an initial review within five business days.

Once the PR is approved and merged, the extension will be available on our Store.

@JohanDevl JohanDevl marked this pull request as ready for review June 25, 2025 21:45
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

New Markdown Preview extension added with real-time preview capabilities and GitHub Flavored Markdown support. Several issues need attention:

  • CHANGELOG.md is missing the required {PR_MERGE_DATE} template string in its entry title
  • Package.json contains invalid future versions of dev dependencies (eslint 9.22.0, TypeScript 5.8.2)
  • The marked library implementation lacks HTML sanitization options, posing potential security risks
  • View commands are present but no screenshots found in metadata folder for store submission requirements

8 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new extension Label for PRs with new extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants