0.1.5 • Published 3 years ago

netlify-cms-widget-richtext v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

netlify-cms-widget-richtext

Check out a demo!

The rich text widget provides a WYSIWYG (What You See Is What You Get) editor based on react-rte and Draft.js.

Please note: If you want to use your rich text editor to fill a markdown file contents after its frontmatter, you'll have to name the field body so the CMS recognizes it and saves the file accordingly.

Install

As an npm package:

npm install --save netlify-cms-widget-richtext
import richText from 'netlify-cms-widget-richtext'

CMS.registerWidget('richtext', RichTextControl, RichTextPreview)

Via script tag:

<script src="https://unpkg.com/netlify-cms-widget-richtext@^0.1.0"></script>

<script>
  CMS.registerWidget('richtext', RichTextControl, RichTextPreview)
</script>

How to use

Add to your Netlify CMS configuration:

fields:
  - { name: 'body', label: 'Blog post content', widget: 'richtext' }

Notice

This package is still in beta. Be careful when using it in production.

To-do list

  • More heading options
  • Improve image selector
  • Include font-size, color and media selectors

Support

For help with this widget, open an issue or ask on the Netlify CMS channel of the Netlify community forum.