Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Quill Dependency to ^2.0.0 #973

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e08843e
Update Quill Dependency to ^2.0.0
VaguelySerious May 6, 2024
ddf62a4
Undo lint changes from my editor
VaguelySerious May 6, 2024
91aae9c
Fix undoing changes
VaguelySerious May 6, 2024
5725aa8
Remove some unecessary renames
VaguelySerious May 6, 2024
5edcaa4
Upgrade typescript to be in line with Quill's typescript version
VaguelySerious May 6, 2024
090bea8
use newly allowed "type" import prefix
VaguelySerious May 6, 2024
0de2508
Update lodash types to fix tsc errors
VaguelySerious May 6, 2024
23938cc
ts-loader update
VaguelySerious May 6, 2024
ca91970
Use ts-load for quill depedency in webpack (fixes build issues)
VaguelySerious May 6, 2024
8b33614
Revert "ts-loader update"
VaguelySerious May 6, 2024
cbe4633
Bump quill to 2.0.1
VaguelySerious May 6, 2024
ea8d72b
Expose getSemanticHTML to UnprivilegedEditor
generalov-epm May 23, 2024
b240c4c
Update index.tsx
generalov-epm May 23, 2024
36ba6df
Delete findDomNode usage and scrolling container
hamidrezahanafi Jul 24, 2024
e2d1894
strict option is also removed
hamidrezahanafi Jul 24, 2024
a1f1474
Merge pull request #5 from hamidrezahanafi/hrh.deletefinddomnode
VaguelySerious Jul 25, 2024
f56c0e2
Bump to v3.0.0, re-export types
VaguelySerious May 16, 2024
7ee395e
Rename repo generally
VaguelySerious May 16, 2024
e1b6224
Update readme
VaguelySerious May 16, 2024
1deb164
Native esmodule build
VaguelySerious May 16, 2024
9b44c1a
Change lodash to esm modules
VaguelySerious May 16, 2024
591c301
Bump version, add support for react 19
VaguelySerious Jul 25, 2024
3475654
Update to ES2020
hamidrezahanafi Jul 30, 2024
af61ff2
Lower tsconfig build target to ES2020 from ES2022 for better compatib…
VaguelySerious Jul 30, 2024
3a5078f
Bump patch version
VaguelySerious Jul 30, 2024
012317b
Merge pull request #1 from generalov-epm/patch-1: Expose getSemanticH…
VaguelySerious Aug 17, 2024
0ecf6ae
Bump version
VaguelySerious Aug 17, 2024
89c4387
Update readme, changelog, and demo code
VaguelySerious Aug 30, 2024
0b9014a
Rename demo do docs
VaguelySerious Aug 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.0
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## v3.3.0

- Expose `getSemanticHTML` from editor instance

## v3.2.0

- Update Quill to 2.0.2

## v3.1.0

- Swap `lodash` dependency with `lodash-es` to reduce bundle size

## v3.0.0

- Upgrade Quill to 2.0.0

## v2.0.0

- Fully ported to TypeScript (#549)
Expand Down
113 changes: 53 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ReactQuill [![Build Status](https://travis-ci.org/zenoamaro/react-quill.svg?branch=master)](https://travis-ci.org/zenoamaro/react-quill) [![npm](https://img.shields.io/npm/v/react-quill.svg)](https://www.npmjs.com/package/react-quill)
[![npm downloads](https://img.shields.io/npm/dt/react-quill.svg?maxAge=2592000)](http://www.npmtrends.com/react-quill)
ReactQuillNew [![npm](https://img.shields.io/npm/v/react-quill-new.svg)](https://www.npmjs.com/package/react-quill-new)
[![npm downloads](https://img.shields.io/npm/dt/react-quill-new.svg?maxAge=2592000)](http://www.npmtrends.com/react-quill-new)
==============================================================================

A [Quill] component for [React].
A modernized [Quill] component for [React].

See a [live demo] or [Codepen](http://codepen.io/alexkrolick/pen/xgyOXQ/left?editors=0010#0).
Note: This is fork of [react-quill](https://zenoamaro.github.io/react-quill/) that updates its QuillJS dependency from 1.3.7 to >=2.0.2 and tries to keep on top of dependency updates and issues, as the original maintainers are no longer active.

[live demo]: https://zenoamaro.github.io/react-quill/
[quill]: https://quilljs.com
[react]: https://facebook.github.io/react/
[live demo]: https://zenoamaro.github.io/react-quill/

- [Quick Start](#quick-start)
- [With webpack or create-react-app](#with-webpack-or-create-react-app)
Expand All @@ -22,7 +22,7 @@ See a [live demo] or [Codepen](http://codepen.io/alexkrolick/pen/xgyOXQ/left?edi
- [HTML Toolbar](#html-toolbar)
- [Custom Formats](#custom-formats)
- [Custom editing area](#custom-editing-area)
- [Upgrading to ReactQuill v2](#upgrading-to-reactquill-v2)
- [Upgrading to ReactQuill v3](#upgrading-to-reactquill-v3)
- [Deprecated props](#deprecated-props)
- [ReactQuill Mixin](#reactquill-mixin)
- [Toolbar component](#toolbar-component)
Expand All @@ -39,17 +39,11 @@ See a [live demo] or [Codepen](http://codepen.io/alexkrolick/pen/xgyOXQ/left?edi

---

This is the documentation for ReactQuill v2 — Previous releases: [v1](/../../tree/v1)

---
💯 **ReactQuill v3**

💯 **ReactQuill v2**
This is the documentation fro ReactQuill 3, which is written in TypeScript and supports React 16+, and runs Quill ^2.0.2. We work hard to avoid introducing any behavioral changes. For the vast majority of the cases, no migration from `react-quill@1` or `react-quill@2` is necessary at all. However, be sure to read the [migration guide](#upgrading-to-reactquill-v3).

ReactQuill 2 is here, baby! And it brings a full port to TypeScript and React 16+, a refactored build system, and a general tightening of the internal logic.

We worked hard to avoid introducing any behavioral changes. For the vast majority of the cases, no migration is necessary at all. However, support for long-deprecated props, the ReactQuill Mixin, and the Toolbar component have been removed. Be sure to read the [migration guide](#upgrading-to-reactquill-v2).

We expect this release to be a drop-in upgrade – if that isn't the case, please [file an issue](/../../issues/new) with the `v2` label.
We expect this release to be a drop-in upgrade – if that isn't the case, please [file an issue](/../../issues/new) with the `v2` labelbb.

---

Expand All @@ -60,7 +54,7 @@ We expect this release to be a drop-in upgrade – if that isn't the case, plea
Make sure you have `react` and `react-dom`, and some way to load styles, like [style-loader](https://www.npmjs.com/package/style-loader). See the documentation on [themes](#themes) for more information.

```sh
npm install react-quill --save
npm install react-quill-new --save
```

```jsx
Expand All @@ -75,29 +69,6 @@ function MyComponent() {
}
```

### With the browser bundle

```html
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/quill.snow.css"
/>
```

```html
<script
src="https://unpkg.com/react@16/umd/react.development.js"
crossorigin
></script>
<script
src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"
crossorigin
></script>
<script src="https://unpkg.com/[email protected]/dist/react-quill.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script type="text/babel" src="/my-scripts.js"></script>
```

## Usage

### Controlled mode caveats
Expand Down Expand Up @@ -138,15 +109,6 @@ Here's an example using [style-loader](https://www.npmjs.com/package/style-loade
import 'react-quill/dist/quill.snow.css';
```

The styles are also available via CDN:

```html
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/quill.snow.css"
/>
```

### Custom Toolbar

#### Default Toolbar Elements
Expand Down Expand Up @@ -348,7 +310,6 @@ The component has two types of formats:

```js
import ReactQuill, { Quill } from 'react-quill'; // ES6
const ReactQuill = require('react-quill'); // CommonJS
```

```jsx
Expand Down Expand Up @@ -416,13 +377,45 @@ class MyComponent extends React.Component {

</details>

## Upgrading to ReactQuill v2
## Upgrading to ReactQuill v3

Upgrading to ReactQuill v3 should be as simple as updating your dependency. However, it also removes support for long-deprecated props, the ReactQuill Mixin, and the Toolbar component.

### Native ES Modules

Upgrading to ReactQuill v2 should be as simple as updating your dependency. However, it also removes support for long-deprecated props, the ReactQuill Mixin, and the Toolbar component.
Quill 2, and as a result ReactQuill 3 which uses it, has moved to native ES modules. If you are
using webpack without ESM support, you will need to make sure you have babel-loader installed and use it to transpile this package by ignoring it in the exclude clause for babel-loader.

It will look something like this:

```js
module.exports = {
entry: {
// your entry points
},
module: {
rules: [
// ... other loaders
{
test: /\.(js|jsx|ts|tsx|cjs)$/,
exclude: /node_modules\/(?!(react-quill-new)\/).*/,
loader: 'babel-loader',
options: {
plugins: [
/* your plugins */
],
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
// ... other loaders
],
},
};
```

### Deprecated props

Support for the `toolbar`, `styles`, `pollInterval` Quill options has long disabled. Starting from this release, ReactQuill will not warn you anymore if you try using them.
Support for the `toolbar`, `styles`, `pollInterval` Quill options has long disabled. Starting from release v2, ReactQuill will not warn you anymore if you try using them.

### ReactQuill Mixin

Expand All @@ -445,10 +438,6 @@ Use the [Toolbar Module](#default-toolbar-elements) or the [HTML Toolbar](#html-
```jsx
// ES6
import ReactQuill, { Quill } from 'react-quill';

// CommonJS
const ReactQuill = require('react-quill');
const { Quill } = ReactQuill;
```

`Quill`
Expand Down Expand Up @@ -661,10 +650,11 @@ Please check the browser support table for the upstream [Quill](https://github.c

## Contributors

ReactQuill would not be where it is today without the contributions of many people, which we are incredibly grateful for:
ReactQuillNew would not be where it is today without the contributions of many people, which we are incredibly grateful for:

- @zenoamaro (maintainer)
- @alexkrolick (maintainer)
- @zenoamaro (maintainer of react-quill)
- @alexkrolick (maintainer of react-quill)
- @vaguelyserious (maintainer of react-quill-new)
- @g12i
- @clemmy
- @asiniy
Expand All @@ -689,12 +679,15 @@ ReactQuill would not be where it is today without the contributions of many peop
- @sandbochs
- @wouterh
- @MattKunze
- @jameskip
- @generalov-epm
- @hamidrezahanafi

## License

The MIT License (MIT)

Copyright (c) 2020, zenoamaro <[email protected]>
Copyright (c) 2020, zenoamaro <[email protected]> and vaguelyserious <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
17 changes: 0 additions & 17 deletions demo/index.html

This file was deleted.

1 change: 0 additions & 1 deletion demo/quill.snow.css

This file was deleted.

1 change: 0 additions & 1 deletion demo/react-quill.js

This file was deleted.

23 changes: 23 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="./quill.snow.css" />
<style>
.ql-toolbar:after {
clear: none !important;
}
</style>
</head>
<body>
<div id="app"></div>
<script
src="https://unpkg.com/react@18/umd/react.development.js"
crossorigin
></script>
<script
src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"
crossorigin
></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script src="./react-quill.js"></script>
<script type="text/babel" src="index.js"></script>
</body>
File renamed without changes.
10 changes: 10 additions & 0 deletions docs/quill.snow.css

Large diffs are not rendered by default.

Loading