Skip to content

Commit

Permalink
ckeditor readme build steps update
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeety4 committed Mar 30, 2023
1 parent 49f925c commit 025a0c5
Showing 1 changed file with 33 additions and 20 deletions.
53 changes: 33 additions & 20 deletions lib/ckeditor/dimagi-README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,49 @@
How to recreate
=====
## About

We are using a custom build of CK Editor 4 with the plugins mentioned [here](#ck-editor-online-build). There are two ways to create this build:
- **Use CK Editor online builder** - This is the recommended option **if no patches are required**. Note that recreating the build this way automatically downloads the latest version of CK Editor.
- **Build from source** - Use this procedure when building with patches that are not yet included in the main line.

> NOTE: **There is one required patch that is not yet addressed in the upstream repo. Hence at present the build is being created from source.**
PR for patch: https://github.com/ckeditor/ckeditor4/pull/304

## CK Editor Online Build

Go to the [CK build editor](http://ckeditor.com/builder).

Use the following plugins:
### Use the following plugins:
* clipboard (for drag and drop)
* entities
* undo (for change events)
* widget
* dialog (required by clipboard)
* [config helper](http://ckeditor.com/addon/confighelper) (for placeholder support)

If by chance this hasn't been updated you can also check build-config.js in
lib/ckeditor/
Alternatively, you can also refer [build-config.js](/lib/ckeditor/build-config.js) to directly download/open the same setup in CKEditor online builder.


## Building from source

Use this procedure when building with patches that are not yet included in the
main line. Feel free to use more recent version numbers if that makes sense.

- clone https://github.com/millerdev/ckeditor-dev and `cd` into ckeditor-dev
- checkout *vellum-build* branch
- download the minimalist skin (v1.0) and unzip/place it in the ./skins
The repo [dimagi/ckeditor-dev](https://github.com/dimagi/) which is fork of upstream repo is used for creating a build from source using the branch **vellum-build**.
Follow the below steps:
- Clone the repo and checkout the **vellum-build** branch.
- In case of **updating to the new released version** of CK Editor or any patches, merge the changes on this branch.
You can add the upstream repo locally using
`git remote add upstream https://github.com/ckeditor/ckeditor4.git`
- Download the minimalist skin (v1.0) and unzip/place it in the ./skins
directory.
- Download confighelper plugin (v1.10.1) and unzip/place it in the ./plugins
directory.
- download confighelper plugin (v1.8.3) and unzip/place it in the ./plugins
directory
- copy vellum/lib/ckeditor/build-config.js into ./dev/builder
- build: ./dev/builder/build.sh --no-tar
- move vellum/lib/ckeditor/ out of the way
- unzip ./dev/builder/release/ckeditor_dev.zip into vellum/lib/ckeditor/
- copy files from old vellum/lib/ckeditor/ into new unzipped dir:
- Copy the file **vellum/lib/ckeditor/build-config.js** into **./dev/builder**
- Run the command from root directory:
```./dev/builder/build.sh --no-tar```
- Move **vellum/lib/ckeditor/** out of the way.
- Unzip .**/dev/builder/release/ckeditor_dev.zip** into **vellum/lib/ckeditor/**
- Copy below files from old **vellum/lib/ckeditor/** into new unzipped dir:
- dimagi-README.md
- build-config.js
- delete extra plugins from vellum/lib/ckeditor/plugins
- delete extra skins from vellum/lib/ckeditor/skins
- Delete extra plugins from **vellum/lib/ckeditor/plugins**.
- Delete extra skins from **vellum/lib/ckeditor/skins**.

> NOTE: Feel free to use more recent versions of minimalist skin and confighelper plugin if that makes sense.

0 comments on commit 025a0c5

Please sign in to comment.