0.2.6 • Published 4 years ago

@helpscout/editor v0.2.6

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

npm.io

Help Scout: Editor

Build Status npm version Storybook Netlify Status node npm

The Help Scout Editor is a project that lets our customers create advanced formatted content easily. Think Paper for Help Scout. Our editor is powered by Slate.

Why Slate?

Slate is a powerful editor framework that helps you deal with difficult parts when building an editor, such as event handlers, elements, formatting, commands, rendering, serializing, normalizing, etc.

While you are trying to build an editor, it still needs a lot of effort to make something similar to Quill or ProseMirror. This repository allows you to build your editor right away with minimal slate knowledge.

Live Demo

Check out the Editor Storybook

📦 Install

npm install @helpscout/editor --save

You will also need these peer dependencies:

npm install @helpscout/hsds-react styled-components react react-dom

Getting Started locally

After cloning this repo down, run:

npm install

Once everything is installed, run:

npm start

You can also run storybook in the background, it will only run the process without opening a new browser tab

npm run storybook:ci

Check out the editor's Storybook at http://localhost:8910/ in your browser!

Generator

When it's time to create a new plugin, you can leverage the Hygen generator:

npm run plugin:generate

The prompt will ask you the name of the plugin, and Hygen will take care of the rest to generate all needed files for you. You can then go in the directory under src/plugins and remove files that would not be needed

Testing

To run Jest in watch mode, run:

npm run dev

To execute all the tests (with Coverage reporting), run:

npm run test

Publishing

Merging a PR

To merge a PR when the release is completed, please do a Squash and merge from the PR page. It will keep the history clean in the master branch

We tend to do a release with only one PR at the time, if possible

Releasing on NPM

This project follows the same pattern as HSDS for releasing from master or a beta build. You can learn more about releasing master or releasing a beta build

To publish and release a new version of the Editor, run the following command:

npm run release

You'll be presented with a CLI prompt with options. Pick the one you want, and that's it! The script will take care of the rest (from testing to publishing).

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago