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 🙏

© 2026 – Pkg Stats / Ryan Hefner

strata-editor

v2.1.1

Published

A production-ready CodeMirror 6 markdown editor with Obsidian-style WYSIWYG editing

Downloads

989

Readme

Strata Editor

A production-ready CodeMirror 6 markdown editor with Obsidian-style WYSIWYG editing.

🔗 Live DemoDocumentationContributing


Features

  • 📝 WYSIWYG Editing — Markdown syntax hides when not editing (like Obsidian)
  • 🔗 Wikilinks[[note]], [[note|alias]], [[note#heading]]
  • 📌 Callouts> [!info], > [!warning], foldable support
  • 🏷️ Tags#tag and #nested/tag with click handlers
  • 🖼️ Images![[image.png]] embedding
  • 🦶 Footnotes[^1] reference and definition
  • 🔦 Highlights==highlighted text==
  • 📊 Tables — GFM tables with full formatting
  • 🧮 Math — LaTeX/KaTeX rendering (via extension)
  • 🎨 Theming — Full CSS variable system, light/dark modes
  • 🔌 Extensible — Simple API for custom syntax
  • 🛡️ Error Boundary — Graceful error handling

Installation

npm install strata-editor @codemirror/autocomplete @codemirror/commands @codemirror/lang-markdown @codemirror/language @codemirror/state @codemirror/view @lezer/highlight @lezer/markdown

Or with specific CodeMirror versions you already have:

npm install strata-editor

Peer Dependencies:

  • React 18+ or 19+
  • CodeMirror 6 packages (see above)

Quick Start

import { MarkdownEditor, EditorErrorBoundary, createThemeStyles, mathExtension } from 'strata-editor';

function App() {
  const [content, setContent] = useState('# Hello World');
  const themeStyles = createThemeStyles({ mode: 'dark' });

  return (
    <div style={themeStyles}>
      <EditorErrorBoundary>
        <MarkdownEditor
          value={content}
          onChange={setContent}
          onWikilinkClick={(data) => console.log('Navigate to:', data.target)}
          onTagClick={(tag) => console.log('Filter by:', tag)}
          extensions={[mathExtension()]}
        />
      </EditorErrorBoundary>
    </div>
  );
}

Theming

Strata uses a host-app-first theming approach. Generate CSS variables with createThemeStyles():

import { createThemeStyles } from 'strata-editor';

const theme = {
  mode: 'dark',
  colors: { background: '#1a1a2e' },
  code: { keyword: '#ff79c6' }
};

const styles = createThemeStyles(theme);
// Apply styles to a container div

See Theming Documentation for full customization options.

Custom Extensions

Add your own syntax support:

import { createExtension } from 'strata-editor';

const mentions = createExtension({
  name: 'mention',
  pattern: /@(\w+)/g,
  className: 'cm-mention',
  onClick: (match) => alert(`User: @${match[1]}`),
});

<MarkdownEditor extensions={[mentions]} />

API Reference

MarkdownEditor Props

| Prop | Type | Description | |------|------|-------------| | value | string | Controlled markdown content | | defaultValue | string | Initial content (uncontrolled) | | onChange | (value: string) => void | Content change handler | | placeholder | string | Placeholder text | | readOnly | boolean | Read-only mode | | extensions | Extension[] | Additional CM6 extensions | | onWikilinkClick | (data, e) => void | Wikilink click handler | | onTagClick | (tag, e) => void | Tag click handler | | wikilinkInteraction | 'click' \| 'modifier' | Trigger mode (default: modifier) | | tagInteraction | 'click' \| 'modifier' | Trigger mode (default: modifier) |

Ref Methods

const editorRef = useRef<MarkdownEditorHandle>(null);

editorRef.current?.getValue();               // Get content
editorRef.current?.setValue(text);           // Set content
editorRef.current?.focus();                  // Focus editor
editorRef.current?.insertText(text);         // Insert at cursor
editorRef.current?.wrapSelection('**', '**');// Wrap selection

Documentation

| Guide | Description | |-------|-------------| | AI Integration | AI streaming & replace patterns | | Theming | CSS variables, custom themes | | Extensions | Creating custom syntax | | Callouts | All callout types | | Tables | Markdown table support | | Math | LaTeX/KaTeX rendering | | Architecture | Editor internals |

Contributing

We welcome contributions! See our GitHub Guide for setup and PR guidelines.

License

MIT