Skip to content

gabrielrtakeda/slate-editor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nossas logo

[Nossas] Slate Editor

A complete rich text editor based on SlateJS framework

Let's install!

It's just simply run yarn add slate-editor --save or npm install slate-editor --save

How to use

You can use which plugin you want. No need to use all plugins available.

In the example below we only add the Bold plugin with its button in the toolbar.

Basic example

import React from 'react'
import {
  SlateEditor, SlateToolbar, SlateContent,
  BoldPlugin, BoldButton
} from 'slate-editor'

const plugins = [BoldPlugin()]

const SlateRichTextEditor = () => (
  <SlateEditor plugins={plugins}>
    <SlateToolbar>
      <BoldButton />
    </SlateToolbar>

    <SlateContent />
  </SlateEditor>
)

export default SlateRichTextEditor

And it's done! 🚀

Take a look at the full working example.

Plugins docs

Contributing

To help us develop new features or fix bugs, to setup your development environment is too simple. Just follow the steps:

  • git clone git@github.com:nossas/slate-editor.git the project
  • yarn start or npm start

And it's done! Easy, isn't?!

References

  • SlateJS - A completely customizable framework for building rich text editors.

About

A complete rich text editor based on SlateJS framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.4%
  • CSS 2.9%
  • Shell 2.1%
  • HTML 1.6%