diff --git a/README.md b/README.md index d821c5c86927f9557e0a108d013cd02a163cb5f1..af88bf1d87852311f6871c4d8579de41257090ac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,19 @@ @indiscale/ckeditor5-complexitywiki-plugins =========================================== -This package was created by the [ckeditor5-package-generator](https://www.npmjs.com/package/ckeditor5-package-generator) package. +This plugin troduces three buttons that insert specific syntax used for CaosDB's +wiki app into the editor field: + +* An `inlineMathButton` which inserts the delimiters for inline MathJax at the + position of the cursor. +* A `displayMathButton` which inserts the delimiters for display MathJax at the + position of the cursor. +* An `inlineReferenceButton` which inserts a template for an inline reference to + another CaosDB entity or one of its properties at the position of the cursor. + +This package was created by the +[ckeditor5-package-generator](https://www.npmjs.com/package/ckeditor5-package-generator) +package. ## Table of contents @@ -20,7 +32,27 @@ This package was created by the [ckeditor5-package-generator](https://www.npmjs. ## Developing the package -To read about the CKEditor 5 framework, visit the [CKEditor5 documentation](https://ckeditor.com/docs/ckeditor5/latest/framework/index.html). +To develop this package, edit the code in the `src` directory. You can use the +[`npm run start` script](#start) to test your changes directly with the editor +defined in `sample/ckeditor.js`. To actually test it together with CaosDB's web +interface, the following steps have to be followed: + +1. `npm pack` this repository and install it in the `ckeditor5-build-classic` + package of our [CKeditor 5 + fork](https://gitlab.indiscale.com/caosdb/src/ckeditor5). +2. Test and build the package as described in that repo's `README_INDISCALE.md`. +3. Zip and copy the build files to `caosdb-webui/libs` +4. Start a CaosDB server with that version of the webinterface and test the + editor in the edit mode + +Only after successful tests and a code review of your changes in this +repository, merge your development branch and publish the new version of this +repo on npm with `npm publish`. Then it can be included in our custom build of +CKEditor which then can subsequently be used in the upstream repo of the +caosdb-webui. + +To read about the CKEditor 5 framework, visit the [CKEditor5 +documentation](https://ckeditor.com/docs/ckeditor5/latest/framework/index.html). ## Available scripts @@ -81,6 +113,18 @@ Examples: npm run lint ``` +### `lint-fix` + +Like the above [`lint`](#lint) but runs ESLint with the `--fix` option which +fixes a lot of formatting issues automatically. + +Examples: + +```bash +# Execute eslint with --fix option +npm run lint-fix +``` + ### `stylelint` Similar to the `lint` task, stylelint analyzes the CSS code (`*.css` files in the `theme/` directory) in the package.