Skip to content

Installation

Cédric Belin edited this page Apr 7, 2022 · 13 revisions

Requirements

Before installing MC2IT Rich Text Editor, you need to make sure you have Node.js and npm, the Node.js package manager, up and running.

You can verify if you're already good to go with the following commands:

node --version
# v10.13.0

npm --version
# 6.4.1

If you plan to play with the package sources, you will also need Gulp.

Installing with npm package manager

1. Install it

From a command prompt, run:

npm install @sab-international/rich-text-editor

2. Import it

Now in your JavaScript or TypeScript code, you can use:

import {RichTextEditor} from '@sab-international/rich-text-editor';

This library is packaged as ECMAScript modules.
To consume it, you must use a dedicated tool chain, like a build system coupled with a bundler.

3. Use it

See the usage information.

Installing from a content delivery network

This library is also available as a ready-made bundle. To install it, add this code snippet to the <head> of your HTML document:

<!-- jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@sab-international/rich-text-editor/build/editor.js"></script>

<!-- UNPKG -->
<script src="https://unpkg.com/@sab-international/rich-text-editor/build/editor.js"></script>