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

@sage-box/article-editor

v0.1.1

Published

Article editor component for SageBox - Rich text and markdown editor

Readme

ui-article-editor

Overview

SageBox - Article Editor Component

A headless-ready article editor supporting HTML and Markdown modes with live preview, formatting toolbar, and optional media library integration.

Properties

| Property | Attribute | Description | Type | Default | | ----------------------- | ------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | availableContentTypes | available-content-types | Available content types (comma-separated or array) | string | 'html,markdown' | | availableModes | available-modes | [DEPRECATED] Use availableContentTypes instead | string | 'html,markdown' | | availableViewModes | available-view-modes | Available view modes (comma-separated or array) | string | 'editor,preview,split' | | contentType | content-type | Content syntax type (html or markdown) | "html" \| "markdown" | 'html' | | customTranslations | -- | Custom translations to override defaults | { modes?: { html: string; markdown: string; editor: string; preview: string; split: string; }; toolbar?: { bold: string; italic: string; underline: string; strikethrough: string; code: string; link: string; image: string; heading1: string; heading2: string; heading3: string; bulletList: string; numberedList: string; quote: string; horizontalRule: string; }; status?: { words: string; characters: string; wordsPlural: string; charactersPlural: string; }; actions?: { externalPreview: string; externalPreviewOpen: string; openMediaLibrary: string; }; placeholders?: { startWriting: string; }; preview?: { title: string; empty: string; }; aria?: { editor: string; toolbar: string; modeSelector: string; formatToolbar: string; preview: string; }; } | undefined | | disabled | disabled | Disabled state | boolean | false | | editorAccent | editor-accent | Custom accent color (buttons, links) | string | undefined | | editorBg | editor-bg | Custom background color for the editor | string | undefined | | editorBgSecondary | editor-bg-secondary | Custom secondary background color | string | undefined | | editorBgTertiary | editor-bg-tertiary | Custom tertiary background color | string | undefined | | editorBorder | editor-border | Custom border color | string | undefined | | editorBorderRadius | editor-border-radius | Custom border radius | string | undefined | | editorFontMono | editor-font-mono | Custom font family for code | string | undefined | | editorFontSans | editor-font-sans | Custom font family for text | string | undefined | | editorFontSize | editor-font-size | Custom font size | string | undefined | | editorText | editor-text | Custom text color | string | undefined | | editorTextSecondary | editor-text-secondary | Custom secondary text color | string | undefined | | enableExternalPreview | enable-external-preview | Enable external preview window | boolean | true | | locale | locale | Locale for UI text (en, es, fr, de, pt, it, zh, ja, ko, ar) | "ar" \| "de" \| "en" \| "es" \| "fr" \| "it" \| "ja" \| "ko" \| "pt" \| "zh" | 'en' | | minHeight | min-height | Minimum height in pixels | number | 400 | | mode | mode | [DEPRECATED] Use contentType instead | "html" \| "markdown" | 'html' | | placeholder | placeholder | Placeholder text when editor is empty | string | 'Start writing...' | | readonly | readonly | Read-only state | boolean | false | | showWordCount | show-word-count | Show word/character count | boolean | true | | spellcheck | spellcheck | Enable spell checking | boolean | true | | value | value | The content value of the editor | string | '' | | viewMode | view-mode | View mode (editor, preview, or split) | "editor" \| "preview" \| "split" | 'editor' |

Events

| Event | Description | Type | | ------------------- | --------------------------------------------------------------------------------------- | ------------------------------------- | | contentTypeChange | Emitted when the content type changes | CustomEvent<ContentTypeChangeEvent> | | editorChange | Emitted when the content changes | CustomEvent<EditorChangeEvent> | | editorModeChange | [DEPRECATED] Use contentTypeChange instead | CustomEvent<ContentTypeChangeEvent> | | mediaInsert | Emitted when a media item should be inserted | CustomEvent<MediaItem> | | mediaLibraryOpen | Emitted when media library is requested | CustomEvent<void> | | viewModeChange | Emitted when the view mode changes | CustomEvent<ViewModeChangeEvent> |

Methods

focusEditor() => Promise<void>

Focus the editor

Returns

Type: Promise<void>

getContent() => Promise<string>

Get the current content

Returns

Type: Promise<string>

getHtml() => Promise<string>

Get content as HTML (converts if in markdown mode)

Returns

Type: Promise<string>

insertAtCursor(content: string) => Promise<void>

Insert content at cursor position

Parameters

| Name | Type | Description | | --------- | -------- | ----------- | | content | string | |

Returns

Type: Promise<void>

insertMedia(media: MediaItem) => Promise<void>

Insert a media item

Parameters

| Name | Type | Description | | ------- | ----------- | ----------- | | media | MediaItem | |

Returns

Type: Promise<void>

setContent(content: string) => Promise<void>

Set the content programmatically

Parameters

| Name | Type | Description | | --------- | -------- | ----------- | | content | string | |

Returns

Type: Promise<void>


Built with StencilJS