dictyBase page editor built using Slate.js
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.
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
.
pageContent
(string) - fetched page content (optional)readOnly
(boolean) - determines if editor is in read-only modehandleSave
(function) - called when user clicks the save buttonhandleCancel
(function) - called when user clicks the cancel buttoninline
(boolean) - used to display a smaller toolbar for inline editing (optional)theme
(Material-UI theme) - any custom MUI theme (optional)
- 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.
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.
Thanks goes to these wonderful people (emoji key):
Eric Hartline 🐛 💻 🖋 🎨 📖 🚧 |
Siddhartha Basu 🐛 💻 🖋 📖 🚧 |
This project follows the all-contributors specification. Contributions of any kind welcome!