Skip to content
Snippets Groups Projects
Commit cf567d80 authored by Christos's avatar Christos
Browse files

Update README.md

parent 28c73f76
No related branches found
No related tags found
1 merge request!43Update README.md
Wax prosemirror Monorepo
<div width="100%" align="center">
<h1>Wax Editor</h1>
</div>
Clone the repo
yarn with node > 11
Running `yarn default` should bring the default editor
Scripts: `yarn` , `yarn clean`, `yarn reset`
| [![MIT license](https://img.shields.io/badge/license-MIT-e51879.svg)](https://gitlab.coko.foundation/wax/wax-prosemirror/raw/master/LICENSE) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
Create a new project in Editors.
This application is being developed by the [Coko Foundation](https://coko.foundation/), for the [University of California Press](http://www.ucpress.edu/) as part of the [Editoria](https://gitlab.coko.foundation/editoria/editoria/) application.
**CREATE-REACT-APP** can be used to setup a new project
Wax Editor is build against Prosemirror libraries. Check Prosemirror [website](https://prosemirror.net/) and [GitHub repo](https://github.com/ProseMirror) for more information.
A simple `sh` script exists in the root folder which will
create a default editor by running `./create.sh your-editor-name`.
Wax is a Monorepo that consists of several packages.
Alternatively:
<h3> wax-prosemirror-core </h3>
Core holds all the funcionality of
* `cd editors`
<h3> wax-prosemirror-schema </h3>
* `yarn create react-app my-editor`
Schema consists of all the different nodes/marks currently supported by the editor.
* `npm install react-app-rewired --save-dev` (to let you overide Webpack's config)
<h3> wax-prosemirror-components </h3>
* Create a `config-overrides.js` file in the root of "my-editor"
React components
<h3> wax-prosemirror-themes </h3>
* add the following code
```
module.exports = function override(config, env) {
config.module = {
rules: [
{
oneOf: [
{
test: /\.js$/,
loader: "babel-loader",
exclude: /node_modules/,
options: {
presets: [
[require("@babel/preset-env"), { modules: false }],
require("@babel/preset-react")
],
plugins: [require("@babel/plugin-proposal-class-properties")]
}
},
{
test: /\.module\.css$/,
use: [
"style-loader",
{
loader: "css-loader",
options: {
modules: true
}
}
]
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.svg$/,
use: "svg-inline-loader"
}
]
}
]
};
return config;
};
```
* finally edit the package.json file and replace scripts with the following
```
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
"eject": "react-scripts eject"
},
```
Inside "my-editor" run `yarn start`
Also you can edit the main package.json of the monorepo in the scripts section to start your editor from there
<h3> wax-prosemirror-layouts </h3>
<h3> wax-prosemirror-utilities </h3>
<h3> Editors </h3>
Editors are private pakages inside the monorepo, for development/demo purposes.
## Table of Contents
- [Get up and running](#get-up-and-running)
## Get up and running
Run a local version of the editor
`"myeditor": "cd editors/my-editor && yarn start"`
and run `yarn myeditor`
1) `git@gitlab.coko.foundation:wax/wax-prosemirror.git`
Now you can add the dependencies to build your editor.
2) `yarn with node > 11`
3) `yarn editoria` Will bring up a demo of the Editoria Ediitor
4) `yarn default` Will bring up a basic version will only an editing surface accepting paragragraphs
Scripts: `yarn` , `yarn clean`, `yarn reset`
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment