npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hebrew-markdown-react

v2.0.0

Published

React wrapper for Dor Pascal's Hebrew Markdown Editor with RTL support, live preview, math formulas, and themes.

Readme

hebrew-markdown-react

Hebrew-friendly Markdown Editor for React (RTL, Preview, KaTeX, Syntax Highlighting)

React wrapper for the Hebrew Markdown Editor
A modern, RTL-friendly Markdown editor with live preview, math rendering, and Apple-inspired design — now as a reusable React component.

npm version License: MIT Based on Dor Pascal's Project


📸 Screenshot

Hebrew Markdown Editor Screenshot


✨ Features

  • ✅ Full Hebrew (RTL) support
  • ✅ Live Markdown preview
  • ✅ Toolbar with formatting actions
  • ✅ Multiple view modes (editor / preview / split)
  • ✅ Theme selection + Dark/Light mode
  • ✅ Math expressions with KaTeX
  • ✅ Syntax highlighting for code blocks
  • ✅ Word & character count
  • ✅ Export as .md
  • ✅ Print the document

🔗 Demo

👉 Live Storybook Demo


📦 Installation

npm install hebrew-markdown-react

Peer dependencies (make sure you already have these installed):

npm install react react-dom

🚀 Usage

Import the component and use it in your app:

import { HebrewMarkdownEditor } from "hebrew-markdown-react";
import { useState } from "react";

export default function App() {
  const [value, setValue] = useState("# שלום עולם 👋");

  return (
    <div style={{ height: '80vh', width: '100%' }}>
      <HebrewMarkdownEditor
        value={value}
        onChange={(val) => setValue(val)}
        onSave={(val) => console.log("Saved:", val)}
        showCredits={false}
      />
    </div>
  );
}

Setting Initial View Mode

You can set the initial view mode using the VIEW_MODES constant for type safety:

import { HebrewMarkdownEditor, VIEW_MODES } from "hebrew-markdown-react";
import { useState } from "react";

export default function App() {
  const [value, setValue] = useState("# שלום עולם 👋");

  return (
    <div style={{ height: '80vh', width: '100%' }}>
      <HebrewMarkdownEditor
        value={value}
        onChange={(val) => setValue(val)}
        viewMode={VIEW_MODES.EDITOR_ONLY}
      />
    </div>
  );
}

Available view modes:

  • VIEW_MODES.SPLIT - Split view (default)
  • VIEW_MODES.EDITOR_ONLY - Editor only
  • VIEW_MODES.PREVIEW_ONLY - Preview only

⚙️ Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | "" | The markdown content of the editor. | | onChange | (content: string) => void | – | Callback fired on every content change. | | onSave | (content: string) => void | undefined | If provided, shows a "Save" button in the toolbar and is called when the user saves (Ctrl+S or button). | | height | string | "100%" | The height of the editor container (e.g., "500px", "80vh"). The component fills its parent by default. | | className | string | "" | Custom CSS class to apply to the root hmr-container element for custom styling. | | viewMode | 'split' \| 'editor-only' \| 'preview-only' | 'split' | The initial view mode of the editor. | | showCredits | boolean | true | Show credit link in the status bar. |


🎨 Custom Styling

You can override the default styles by targeting the prefixed CSS classes. The root container has the class hmr-container.

Here's an example of how to change the toolbar background and the primary color:

/* your-custom-styles.css */
.my-custom-editor .hmr-toolbar {
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
}

.my-custom-editor {
  --hmr-primary: #ff5722; /* Change the primary color */
}

Then, apply your custom class via the className prop:

import "./your-custom-styles.css";

<HebrewMarkdownEditor
  className="my-custom-editor"
  value={value}
  onChange={setValue}
/>

Development

  • Requires Node.js 20.19.0 or higher (see .nvmrc)
nvm use
  • Install dependencies:
npm install

📖 Storybook

Run Storybook locally to explore and play with the editor:

npm run storybook

🤝 Contributing

Contributions are welcome! 🚀

  1. Fork the repo
  2. Create a branch (git checkout -b feature/awesome)
  3. Commit changes (git commit -m "Add awesome feature")
  4. Push (git push origin feature/awesome)
  5. Open a Pull Request

📃 License

This project is licensed under the MIT License. See the LICENSE file for details.


👤 Authors