Skip to main content

Composer Installation

The editor42/editor42 package is the editor's ready-to-use build, the same one you can download, for PHP projects that take their front-end libraries from Composer. There is no account and no key of any kind.

Install​

composer require editor42/editor42

Basic Setup​

The files land in vendor/editor42/editor42/. Serve that folder, or copy it into your public directory, and load the editor from it:

<script src="/editor42/editor42.min.js"></script>

<textarea id="my-editor"></textarea>

<script>
editor42.init({
selector: '#my-editor'
});
</script>

Keep the folder whole: editor42.min.js loads its plugins, skins, icons, themes and models from the folders next to it.

Updates​

composer update editor42/editor42

The package carries the editor's own version number, so a constraint of ^42 takes every fix release.