0.59.1 • Published 3 years ago

slate-plugins-next v0.59.1

Weekly downloads
268
License
MIT
Repository
github
Last release
3 years ago

slate-plugins-next

codecov          

All Contributors

Slate is a completely customizable framework for building rich text editors. However, your codebase can quickly get complex when implementing tens of features. Built on top of Slate, slate-plugins-next enables you to use a list of configurable and extendable plugins to keep your codebase clean and easy to debug.

This library comes with a lot of plugins for the elements, marks, deserialization, normalization, and so on. We also provide a bunch of helpers on top of Slate's API.

Try out the existing ones and create your own plugins!

📦 Included

  • ✨ 20+ Editor Plugins.
  • ✅ Unit tested with slate@0.58.1.
  • 🏷️ Separation of Concerns.
  • ⚛️ Atomic Design.
  • 📖 Docs and Demos on Storybook.

Table of contents

🚀 Getting Started

yarn add slate-plugins-next@0.58.13

⚠️ In production, you should pin the dependency until 1.0.0 is released.

You will also need these peerDependencies:

yarn add slate slate-hyperscript slate-react styled-components react react-dom

For full documentation on using slate-plugins-next visit: slate-plugins-next.netlify.app

For additional help, join us in our Slack

🔌 Plugins

Element Plugins
BasicElementsEnables support for basic elements.
BlockquoteEnables support for block quotes.
CodeBlockEnables support for pre-formatted code blocks.
HeadingEnables support for headings (from 1 to 6).
ImageEnables support for images.
ImageUploadAllows for pasting images from clipboard.
LinkEnables support for hyperlinks.
ListEnables support for bulleted, numbered and to-do lists.
MediaEmbedEnables support for embeddable media such as YouTube or Vimeo videos.
MentionEnables support for autocompleting @mentions and #tags.
ParagraphEnables support for paragraphs.
TableEnables support for tables.
Mark Plugins
BasicMarksEnables support for basic text formatting.
BoldEnables support for bold formatting.
CodeEnables support for inline code formatting.
HighlightEnables support for highlights.
ItalicEnables support for italic formatting.
StrikethroughEnables support for strikethrough formatting.
SubscriptEnables support for subscript formatting.
SuperscriptEnables support for superscript formatting.
UnderlineEnables support for underline formatting.
Deserializer Plugins
DeserializeHtmlEnables support for deserializing content from HTML format to Slate format.
DeserializeMarkdownEnables support for deserializing content from Markdown format to Slate format.
Normalizer Plugins
NormalizeTypesEnables support for defining type rules for specific locations in the document.
TrailingNodeEnables support for inserting a trailing node of a configurable type when the type of the last node is not matching.
Handler Plugins
AutoformatEnables support for autoformatting actions.
SoftBreakEnables support for inserting soft breaks.
Decorator Plugins
PreviewEnables support for previewing.
Toolbar
BalloonToolbarProvides a toolbar, pointing at a particular element or range.
ToolbarProvides a toolbar with buttons.
Utility Plugins
NodeIDEnables support for inserting nodes with an id key.
Widget Plugins
SearchHighlightEnables support for highlighting searching text.

🤔 Notice

Why

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

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

Bundle size

For simplicity, a single package slate-plugins-next has been published to share all the plugins. It's not a problem as it is tree-shakeable. However, a few plugins use external dependencies. These should be moved into their own package in the future.

👥 Community

👏 Contributing

We welcome contributions to slate-plugins-next! Please feel free to share your own plugins here.

📥 Pull requests and 🌟 Stars are always welcome. Read our contributing guide to get started, or find us on Slack, we will take the time to guide you

👨‍💻 Development scripts

Useful scripts include:

yarn

Installs package dependencies

yarn storybook

Starts storybook dev

yarn lint

boolean check if code conforms to linting eslint rules

yarn test

Test with Jest

yarn release

Lint, test, build and push a release to git and npm will ask for version in interactive mode - using lerna.

Contributors ✨

License

MIT

0.59.0

3 years ago

0.59.1

3 years ago

0.58.13

4 years ago

0.58.12

4 years ago

0.58.11

4 years ago

0.58.9

4 years ago

0.58.10

4 years ago

0.58.8

4 years ago

0.58.7

4 years ago

0.58.6

4 years ago

0.58.5

4 years ago

0.58.3

4 years ago

0.58.4

4 years ago

0.58.2

4 years ago

0.58.1

4 years ago

0.58.0

4 years ago

0.57.15

4 years ago

0.57.14

4 years ago

0.57.13

4 years ago

0.57.12

4 years ago

0.57.11

4 years ago

0.57.10

4 years ago

0.57.9

4 years ago

0.57.8

4 years ago

0.57.7

4 years ago

0.57.6

4 years ago

0.57.5

4 years ago

0.57.4

4 years ago

0.57.3

4 years ago

0.57.2

4 years ago

0.57.1

4 years ago

0.56.9

4 years ago

0.56.5

4 years ago

0.56.3

4 years ago

0.56.2

4 years ago

0.56.1

4 years ago