# maileditor-ckeditor

> Custom CKEditor build for the Maileditor

Latest version **1.0.0** (published 2023-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install maileditor-ckeditor
pnpm add maileditor-ckeditor
yarn add maileditor-ckeditor
bun add maileditor-ckeditor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-07-27 |
| First published | 2023-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Unpacked size | 15.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Sebastian Mordziol |
| Maintainers | mistralys |

## Links

- npm: https://www.npmjs.com/package/maileditor-ckeditor
- Repository: https://github.com/mistralys/ckeditor5-maileditor
- Homepage: https://git.ionos.org/communication/maileditor-ckeditor
- Issues: https://github.com/mistralys/ckeditor5-maileditor/issues
- npm.io page: https://npm.io/package/maileditor-ckeditor

## Dependencies (19)

- [webpack](https://npm.io/package/webpack.md) ^4.43.0
- [raw-loader](https://npm.io/package/raw-loader.md) ^3.1.0
- [webpack-cli](https://npm.io/package/webpack-cli.md) ^3.3.12
- [style-loader](https://npm.io/package/style-loader.md) ^1.2.1
- [postcss-loader](https://npm.io/package/postcss-loader.md) ^3.0.0
- [maileditor-link](https://npm.io/package/maileditor-link.md) file:maileditor_plugins/maileditor-link
- [maileditor-add-link](https://npm.io/package/maileditor-add-link.md) file:maileditor_plugins/maileditor-add-link
- [@ckeditor/ckeditor5-link](https://npm.io/package/@ckeditor/ckeditor5-link.md) ^20.0.0
- [@ckeditor/ckeditor5-list](https://npm.io/package/@ckeditor/ckeditor5-list.md) ^20.0.0
- [ckeditor5-paste-plaintext](https://npm.io/package/ckeditor5-paste-plaintext.md) ^1.0.1
- [@ckeditor/ckeditor5-typing](https://npm.io/package/@ckeditor/ckeditor5-typing.md) ^20.0.0
- [@ckeditor/ckeditor5-alignment](https://npm.io/package/@ckeditor/ckeditor5-alignment.md) ^20.0.0
- [@ckeditor/ckeditor5-dev-utils](https://npm.io/package/@ckeditor/ckeditor5-dev-utils.md) ^21.0.0
- [@ckeditor/ckeditor5-paragraph](https://npm.io/package/@ckeditor/ckeditor5-paragraph.md) ^20.0.0
- [@ckeditor/ckeditor5-essentials](https://npm.io/package/@ckeditor/ckeditor5-essentials.md) ^20.0.0
- [@ckeditor/ckeditor5-theme-lark](https://npm.io/package/@ckeditor/ckeditor5-theme-lark.md) ^20.0.0
- [@ckeditor/ckeditor5-basic-styles](https://npm.io/package/@ckeditor/ckeditor5-basic-styles.md) ^20.0.0
- [@ckeditor/ckeditor5-remove-format](https://npm.io/package/@ckeditor/ckeditor5-remove-format.md) ^20.0.0
- [@ckeditor/ckeditor5-editor-classic](https://npm.io/package/@ckeditor/ckeditor5-editor-classic.md) ^20.0.0

## Recent versions

- 1.0.0 (latest) — 2023-07-27

## README

# Custom Maileditor CKEditor5 build

This is used to generate the javascript include for the CKEditor, which is used as
WYSIWYG editor in the Maileditor.

It is built using the [CKEditor Framework][], to allow full customization of the toolbar
elements and plugins used in the editor. The Maileditor allows only a very restricted
set of HTML elements, which are then parsed by the `MarkupParser`. CKEditor creates clean
HTML, which helps in getting good results.

## Build setup

### Requirements

- Node.js

### Installation

- Run `npm install` in the folder
- Recommended: install `webpack` and `webpack-cli` globally

### How it works

The node package manager (npm) is used to install all the required dependencies into the
`node_modules` folder. The `app.js` file determines which base packages and plugins need
to be loaded, using imports. When webpack is run, it uses these import statements to
determine which sources to bundle, and compiles them all into the CKEditor include file.

Note: all import statements in the `app.js` file are relative to the `node_modules` folder.

## Creating a build

- Run either the `build-dev` or `build-prod` batch script

This will compile the javascript source under `dist/bundle.js`, and copy the file over
to the maileditor's themes folder, so it can be used there as well.

To view an example editor, open `index.html` in the browser.

## List of plugins

This build uses a selection of custom plugins:

- [ckeditor5-paste-plaintext][]: For easy pasting from any sources without formatting.
- [maileditor-select-link][]: Select an existing mailing link to link a selection with.
- [maileditor-add-link][]: Open the maileditor dialog to add a new link to the mailing.

### Maileditor plugin sources

The custom Maileditor-specific plugins are maintained right here, in the `maileditor_plugins`
folder. They are installed along with the rest of the npm packages, directly from that folder.

Note: When using local file-based packages, node creates a symlink to the source folder in
the `node_modules` folder. This makes it easy to work on the plugin source files. Running
a build then automatically uses the source files.

[CKEditor Framework]: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/quick-start.html
[ckeditor5-paste-plaintext]: https://github.com/Mistralys/ckeditor5-paste-plaintext
[maileditor-add-link]: https://git.ionos.org/communication/maileditor-ckeditor-add-link
[maileditor-select-link]: https://git.ionos.org/communication/maileditor-ckeditor-select-link

---
_Source: https://npm.io/package/maileditor-ckeditor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
