Skip to content

dictyBase/dicty-components-page-editor

Repository files navigation

dicty-components-page-editor 📝

All Contributors

License
GitHub tag GitHub action
codecov Maintainability
Last commit
Funding

dictyBase page editor built using Slate.js

Install

yarn add dictyBase/dicty-components-page-editor

To install a specific version, add a tag to the end. You can see the latest release on the right side of this repository page.

yarn add dictyBase/dicty-components-page-editor#2.0.0

Note that any version from 1.4.0 on up uses the new Slate 0.5x data format. Versions 3.0.0 and up do not have a data migration script bundled with the library.

Usage

Check the example folder for a demo app showing how to use the page editor library.

The demo app can also be started by running yarn demo.

Props

  • pageContent (string) - fetched page content (optional)
  • readOnly (boolean) - determines if editor is in read-only mode
  • handleSave (function) - called when user clicks the save button
  • handleCancel (function) - called when user clicks the cancel button
  • inline (boolean) - used to display a smaller toolbar for inline editing (optional)
  • theme (Material-UI theme) - any custom MUI theme (optional)

Development

  • Clone the develop branch of this repository
  • Run yarn install
  • Create a new branch (i.e. feature/foo-plugin)
  • Complete any necessary work.
  • Read the individual docs for guides.
  • Commit all changes and open a pull request. If all checks pass, it is ready to merge to develop.

If you are ready to cut a new release, you can then merge into master. This will trigger a GitHub Action that uses semantic-release to create a new tag automatically.

Live Development

To open a demo and see your changes happen live, first run yarn start from the root directory. Then run yarn start from the /example directory.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Eric Hartline

🐛 💻 🖋 🎨 📖 🚧

Siddhartha Basu

🐛 💻 🖋 📖 🚧

This project follows the all-contributors specification. Contributions of any kind welcome!

Misc badges

Issues Open Issues Closed Issues
Total PRS Open PRS Closed PRS Merged PRS
Commits Branches Tags
GitHub repo size GitHub code size in bytes Lines of Code