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

@aglyn/aglyn-markdown-editor

v1.0.0-beta.172

Published

The markdown-lite WYSIWYG editor: visual surface, toolbar, source/visual toggle, HTML-to-markdown paste, link dialog, and the read-only view. It is the editor the Aglyn console uses for content, and the one `@aglyn/besigner-ui` uses for a Markdown compone

Downloads

1,092

Readme

@aglyn/aglyn-markdown-editor

The markdown-lite WYSIWYG editor: visual surface, toolbar, source/visual toggle, HTML-to-markdown paste, link dialog, and the read-only view. It is the editor the Aglyn console uses for content, and the one @aglyn/besigner-ui uses for a Markdown component's content attribute. Install it on its own if you need to edit or preview Aglyn's markdown-lite dialect in a React and MUI app; most consumers get it as a dependency of @aglyn/besigner-ui.

Beta. Published from the Aglyn monorepo under the beta dist-tag; APIs can change between beta releases.

Install

npm install @aglyn/aglyn-markdown-editor@beta

Peer dependencies:

  • react
  • @mui/material
  • @mui/icons-material

What's in it

Components:

  • MarkdownField is the complete field: a label, the toolbar, the visual editor and a raw-source mode, driven by value and onChange. It takes an optional onPickImageFromMedia callback so the caller can supply its own media picker, and an editorRef that hands back a MarkdownFieldHandle for inserting a picked image.
  • MarkdownVisualEditor is the visual editing surface by itself, and MarkdownEditorToolbar is its toolbar, for callers that lay the pieces out themselves.
  • MarkdownLinkDialog and LinkTargetAutocomplete are the link controls. The autocomplete offers the targets the caller passes in, and searches entries when the core's link-target search context is mounted.
  • MarkdownLiteView renders markdown-lite source read-only.

Functions:

  • markdownToRows, rowsToMarkdown and readInlinesFromElement convert between markdown-lite source and the editor's row model.
  • htmlToRows and htmlToInlines convert pasted HTML.
  • applyCommandToSource and applyLinkToSource apply a toolbar command to a raw-source selection.

The markdown-lite dialect itself (its parser and serializer) lives in @aglyn/aglyn, not here. This package is the UI over it.

Every file under src/lib is also reachable by subpath, for example @aglyn/aglyn-markdown-editor/markdown-lite-view.component.

Usage

import { MarkdownField, MarkdownLiteView } from '@aglyn/aglyn-markdown-editor'
import { useState } from 'react'

export function BodyEditor() {
  const [body, setBody] = useState('')
  return (
    <>
      <MarkdownField label="Body" value={body} onChange={setBody} />
      <MarkdownLiteView source={body} />
    </>
  )
}

How it fits

This package sits in the core scope of the package map as its UI piece: it imports only @aglyn/aglyn, because the editor speaks the markdown-lite dialect the core defines. That is also why it is not one of the generic @aglyn/shared-* packages, which may not know Aglyn's model. It is a library rather than part of an app because both the console and the designer UI need the same editor. It imports no plugin and no other UI package.

License

Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/aglyn-markdown-editor