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 🙏

© 2024 – Pkg Stats / Ryan Hefner

saged

v0.7.0

Published

Saged is the editor used on blog.sagacious.dev site. It embeds draftjs and monaco right out of the box.

Downloads

16

Readme

saged

saged is the editor used on blog.sagacious.dev site. It embeds draftjs and monaco right out of the box.

NPM JavaScript Style Guide

Install

npm install --save saged

Features

  1. WYSIWYG editor
  2. Configurable
  3. Comes with monaco editor (VS Code editor) baked in
  4. Markdown support
  5. Supports Server Side Rendering (Tested with Next.js) 🎉

Usage

Using the defaults

import React from 'react'

import Editor from 'saged'

function Editor() {
    return <Editor />
}

Configuring the editor

import React from 'react'

import Editor from 'saged'
import Classes from './package.module.css'

function Editor() {
    return (
        <Editor
            content={localStorage.getItem('saged-example-item-eerTy443')}
            storageKey="some-random-key"
            className={Classes.editorOverride}
            readonly
        />
    )
}

Props

  1. readOnly (boolean): Specify if the editor should open in a read only mode. If opened in readonly mode then it will act as a previewer.
  2. content (string): Content to be displayed by the text editor. This is supposed to follow the draftjs content schema and hence is not meant to be handled manually.
  3. storageKey (string): Saged stores the content in the local storage. This key is used to store the data in local storage. Defaults to "article".
  4. className (string): Override the default style of the editor container using this class name. Note that not all the styles can be overidden.
  5. onChange ((content: string) => void): Optional function which will be invoked when editor state changes

Caveats

  1. Media uploads is not supported at the moment. Markdown should be used to embed such content.
  2. Table is not supported yet, markdown should be used to embed such content.

License

Apache 2.0 © utkarsh-pro