Editor used by Prepleaf and Masai School
Dev server
```
npm run dev
Create build for distribution
``
npm run build
Copy all the fonts to your public root. Run the following command
``
cp -R node_modules/prepleaf-editor/lib/fonts public
Replace public with your root directory, like static, build
Pass transformImageUrl function as the prop
function signature
``
transformImageUrl(originalUrl:string): string
This can be used to load images from proxy
Example:
`${url}${url.includes('?') ? '' : '?'}&size=120
const transformImageUrl = (url) => {
return ;`
};
Proxy images
`https://images.prepleaf.com/?url=${encodeURIComponent(url)}
const transformImageUrl = (url) => {
return ;
};
`
It supports adding ordered list and unordered list in the editor same way as in slack. You can start typing 1. or - ` to start adding ordered list and unordered list respectively.
You can press Ctrl/Cmd + 7 to add ordered list and Ctrl/Cmd + 8 to add unordered list.