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

becs4ever

v0.0.1

Published

Dante wysiwyg rewritten in draft-js

Downloads

5

Readme

Dante 2 - The rematch

just another medium clone built on top of DraftJs

Dante 2 is a complete rewrite of DanteEditor. This version is built on top of Facebook's Draft-Js and reaches all Dante's features with a shiny ultra mega super uber maintainable architecture.

See the demo at: https://michelson.github.io/dante2/

Why rewrite a new version of Dante?

The previous version of Dante relies a lot on DOM manipulation which causes a mix of presentation and logic. Even with their modular plugin system this condition suppose an sphagetti model to work with on every feature. The biggest problem with this approach is: if you want to make a change that affects the presentation of your users content, let's say you might want to change the default markup for paragraphs, you'll probably end updating all your content in your database, because dealing with "DOM only" suppose that you are going to save html into database, right ?

A redesign was needed!

Draft-Js handles selection, ranges and markup blocks as a data layer contained in a structure known as editorState, with a clear separation on how rendering, styling and interaction works. So you save content data, not html. That's awesome because you can change the appearance of articles (styles & markup) without database changes.

In Draft every change provided from user input is stacked in this editorState building an history of changes, out of the box. This means that pasting, undo/redo and replace/insert blocks at certain selection points are basically calls to the DraftJs API that updates the editorState without DOM manipulation. Also, all the custom blocks are composed as React components!. So, this version have some dependencies which are included in source. DraftJs, React, Immutable. no Jquery.

New Features:

  • Improved undo/redo.
  • Save Content as a data JSON structure.
  • Load Content as a data JSON structure.
  • Handle image blocks on Copy/Paste and Drop.
  • Global storage lock to handle file uploads.

Features:

  • Image upload for paste html.
  • Image upload for legacy images on existent texts.
  • The medium (+) Tooltip to embed or upload media.
  • Tab navigation.
  • Pluggins are React components

Embeds:

  • Image Uploader with preview and caption option with a lock system.
  • Embed data for pasted link through OEmbed services.
  • Embed media information for pasted links through OEmbed services.
  • Add or remove tooltip buttons with ease with plugin system.
  • Add custom blocks many with custom options

Installation

npm install Dante2@next or yarn add Dante2@next

Usage

Since version 0.5.x there is only a component based way to use the editor. If you need a non component based use versions below 0.5.x

Component Based
```javascript
<DanteEditor
  config={this.config}
  content={this.demo}
/>

Options:

Many configuration options and plugin usage can be found on the documentation page:

See https://michelson.github.io/dante2/doc.html

Development

Installation

  • git clone https://github.com/michelson/dante2

dependencies

  • npm install or yarn install

Run Dante2

  • npm start or yarn start

Then open http://localhost:8080

Building

  • npm build or yarn build

Upload test server (optional)

For development purposes we have a server, written in ruby, to handle file uploading

  • bundle install

  • bundle exec rackup

and open http://localhost:9292

Open source license

If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use Dante2 under the terms of the GPLv3.Read more about Dante2's license.

Alternatives

If you are looking for alternatives you can always use the MIT licensed Dante (1) or choose along others medium clones or check out many many awesome draft-js based editors

Acknowledgments

The code from tools is based on the build tools from ReactBoostrap