@caudex/codex-editor v1.1.0
Codex text editor
This repository contains the text editor module used in Codex. The Codex editor is based off of the Toast UI editor, and it is composed of the React wrapper and the tui-editor itself.
Installation
To download the editor, run git submodule update --init --recursive
from the root directory of /codex
. This will clone the editor submodule into its folder.
Next, build the editor by running cd editor && npm install && npm run build
.
To install into the client, run npm install --save ../codex-editor
from /codex/client
. This installs the editor as a node module so that it can be used by the client.
Development
Making changes to the editor and seeing these changes in real-time requires a few configuration steps:
1. To link changes to the editor to the one installed in /codex/client
, run npm link
in /codex/codex-editor
and then npm link @caudex/codex-editor
. Otherwise, npm install --save ../codex-editor
must be run after each change to the editor.
2. The files for the editor itself are contained inside the editor directory and compiled using webpack into single files for the editor and viewer that the React wrapper then uses. Compiling from scratch takes about 20 seconds, but changes can be automatically compiled in ~1s by building the editor in watch mode. To do this, run npm run watch
from the editor
directory.