2.2.4 • Published 11 months ago

@coralproject/rte v2.2.4

Weekly downloads
140
License
Apache-2.0
Repository
-
Last release
11 months ago

Coral RTE CircleCI

Coral RTE is a lightweight and extensible Rich Text Editor based on React and Squire.

Demo

Installation

npm install @coralproject/rte --save-dev

Usage

import { CoralRTE, Bold, Italic, Blockquote } from "@coralproject/rte";
import createDOMPurify from "dompurify";

// See https://github.com/cure53/DOMPurify
const DOMPurify = createDOMPurify(window);

const sanitizeToDOMFragment = (html) => {
  if (!html) {
    return document.createDocumentFragment();
  }
  return DOMPurify.sanitize(html, { RETURN_DOM_FRAGMENT: true });
};

<CoralRTE
  inputID="rte-field"
  className="coral-rte"
  contentClassName="coral-rte-content"
  placeholderClassName="coral-rte-placeholder"
  toolbarClassName="coral-rte-toolbar"
  onChange={(html) => setValue(html)}
  value={value}
  disabled={disabled}
  placeholder={"Enter some content"}
  features={[<Bold />, <Italic />, <Blockquote />]}
  toolbarPosition="bottom"
  sanitizeToDOMFragment={sanitizeToDOMFragment}
/>;

Development

npm run dev

Build

npm run build

Releasing

When you're ready to release a new vesrion of @coralproject/rte, you can do the following:

  1. Run npm version --no-git-tag-version (major|minor|patch) to update the version number in package files.
  2. Push the changes to a new branch, and submit a PR against main.
  3. Once the changes have been approved, and all the code you want to deploy for the version is in main, create a release with the version number: v0.4.0 (Note that the v prefix is required)

CircleCI will run your tests and release the new version for you.

2.2.3

1 year ago

2.2.4

11 months ago

2.2.2

2 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.3.1

3 years ago

1.3.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.11.1

4 years ago

0.11.0

5 years ago

0.10.15

5 years ago

0.10.14

5 years ago

0.10.13

6 years ago

0.10.12

6 years ago

0.10.11

6 years ago

0.10.10

6 years ago

0.10.9

6 years ago

0.10.8

6 years ago

0.10.7

6 years ago

0.10.6

6 years ago

0.10.5

6 years ago

0.10.4

6 years ago

0.10.3

6 years ago

0.10.2

6 years ago

0.10.1

6 years ago