diff --git a/package-lock.json b/package-lock.json
index 6c8d2f444..fac10d4c8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,7 +12,6 @@
"website"
],
"dependencies": {
- "classnames": "^2.3.2",
"eventemitter3": "^4.0.7",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
@@ -24685,6 +24684,7 @@
"dependencies": {
"@mdx-js/react": "^2.1.5",
"babel-preset-gatsby": "^2.24.0",
+ "classnames": "^2.3.2",
"gatsby-plugin-google-analytics": "^4.24.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
@@ -38781,9 +38781,10 @@
"requires": {
"@mdx-js/react": "^2.1.5",
"babel-preset-gatsby": "^2.24.0",
+ "classnames": "*",
"gatsby": "^4.24.5",
"gatsby-plugin-feed": "^4.24.0",
- "gatsby-plugin-google-analytics": "*",
+ "gatsby-plugin-google-analytics": "^4.24.0",
"gatsby-plugin-mdx": "^4.3.0",
"gatsby-plugin-react-svg": "^3.1.0",
"gatsby-plugin-sass": "^5.24.0",
diff --git a/package.json b/package.json
index 79c82be27..29a5ffa0e 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,6 @@
"website"
],
"dependencies": {
- "classnames": "^2.3.2",
"eventemitter3": "^4.0.7",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
diff --git a/tsconfig.json b/tsconfig.json
index 17f354d12..24ed67737 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,6 +7,5 @@
"module": "es6",
"moduleResolution": "node"
},
- "include": ["./**/*"],
- "exclude": ["./website/**/*"]
+ "include": ["./**/*"]
}
diff --git a/website/.gitignore b/website/.gitignore
index ad3274bf5..129d49bcb 100644
--- a/website/.gitignore
+++ b/website/.gitignore
@@ -2,4 +2,4 @@ node_modules
# Gatsby files
/.cache/
-/public
\ No newline at end of file
+/public
diff --git a/website/content/blog/a-new-delta.mdx b/website/content/blog/a-new-delta.mdx
index 13a0cbc03..8ae8a0741 100644
--- a/website/content/blog/a-new-delta.mdx
+++ b/website/content/blog/a-new-delta.mdx
@@ -27,12 +27,15 @@ var oldFormat = {
endLength: 2,
ops: [
{ start: 0, end: 1 },
- { start: 2, end: 3 },
- ],
+ { start: 2, end: 3 }
+ ]
};
var newFormat = {
- ops: [{ retain: 1 }, { delete: 1 }],
+ ops: [
+ { retain: 1 },
+ { delete: 1 }
+ ]
};
```
@@ -46,21 +49,16 @@ The new Delta format provides native support for embeds, which can be used to re
var oldFormat = {
startLength: 0,
endLength: 1,
- ops: [
- {
- text: '!',
- attributes: { image: 'https://octodex.github.com/images/labtocat.png' },
- },
- ],
+ ops: [{
+ text: '!',
+ attributes: { image: 'https://octodex.github.com/images/labtocat.png' }
+ }]
};
var newFormat = {
- ops: [
- {
- insert: 1,
- attributes: { image: 'https://octodex.github.com/images/labtocat.png' },
- },
- ],
+ ops: [{
+ insert: 1, attributes: { image: 'https://octodex.github.com/images/labtocat.png' }
+ }]
};
```
diff --git a/website/content/blog/an-official-cdn-for-quill.mdx b/website/content/blog/an-official-cdn-for-quill.mdx
index 7b55c8e48..623a37a0c 100644
--- a/website/content/blog/an-official-cdn-for-quill.mdx
+++ b/website/content/blog/an-official-cdn-for-quill.mdx
@@ -18,5 +18,3 @@ You can also use "latest" as the version:
```html
```
-
-{/* more */}
diff --git a/website/content/blog/the-state-of-quill-and-2-0.mdx b/website/content/blog/the-state-of-quill-and-2-0.mdx
index a040ddbf2..18b0098c8 100644
--- a/website/content/blog/the-state-of-quill-and-2-0.mdx
+++ b/website/content/blog/the-state-of-quill-and-2-0.mdx
@@ -12,5 +12,3 @@ right audience is designed for. Quill 1.0 pushed the boundaries on
the former, and now 2.0 will focus on the latter.
Let’s take a look at how we got here and where Quill is going!
-
-{/* more */}
\ No newline at end of file
diff --git a/website/content/docs/api.mdx b/website/content/docs/api.mdx
index 586da65ad..8876c2ef5 100644
--- a/website/content/docs/api.mdx
+++ b/website/content/docs/api.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: API
---
diff --git a/website/content/docs/configuration.mdx b/website/content/docs/configuration.mdx
index d6c8e373f..db0f725e5 100644
--- a/website/content/docs/configuration.mdx
+++ b/website/content/docs/configuration.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Configuration
---
diff --git a/website/content/docs/delta.mdx b/website/content/docs/delta.mdx
index 652a56795..9c61cbe35 100644
--- a/website/content/docs/delta.mdx
+++ b/website/content/docs/delta.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Delta
---
@@ -20,8 +19,8 @@ The Delta format is almost entirely self-explanatory—the example below des
ops: [
{ insert: 'Gandalf', attributes: { bold: true } },
{ insert: ' the ' },
- { insert: 'Grey', attributes: { color: '#cccccc' } },
- ];
+ { insert: 'Grey', attributes: { color: '#cccccc' } }
+ ]
}
```
@@ -56,8 +55,8 @@ Attributes associated with a newline character describes formatting for that lin
ops: [
{ insert: 'The Two Towers' },
{ insert: '\n', attributes: { header: 1 } },
- { insert: 'Aragorn sped on up the hill.\n' },
- ];
+ { insert: 'Aragorn sped on up the hill.\n' }
+ ]
}
```
@@ -76,8 +75,8 @@ The `delete` operation instructs exactly what it implies: delete the next number
```javascript
{
ops: [
- { delete: 10 }, // Delete the next 10 characters
- ];
+ { delete: 10 } // Delete the next 10 characters
+ ]
}
```
@@ -110,8 +109,8 @@ Starting with the above "Gandalf the Grey" example:
{ insert: 'White', attributes: { color: '#fff' } },
// Delete "Grey"
- { delete: 4 },
- ];
+ { delete: 4 }
+ ]
}
```
diff --git a/website/content/docs/download.mdx b/website/content/docs/download.mdx
index f44fe1438..70abc464f 100644
--- a/website/content/docs/download.mdx
+++ b/website/content/docs/download.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Download
---
diff --git a/website/content/docs/formats.mdx b/website/content/docs/formats.mdx
index 816a7e08f..61d77c38b 100644
--- a/website/content/docs/formats.mdx
+++ b/website/content/docs/formats.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Formats
---
diff --git a/website/content/docs/modules.mdx b/website/content/docs/modules.mdx
index 7efdfa821..72008ccec 100644
--- a/website/content/docs/modules.mdx
+++ b/website/content/docs/modules.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Modules
---
diff --git a/website/content/docs/modules/clipboard.mdx b/website/content/docs/modules/clipboard.mdx
index 78db2172b..67119223f 100644
--- a/website/content/docs/modules/clipboard.mdx
+++ b/website/content/docs/modules/clipboard.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Clipboard Module
---
diff --git a/website/content/docs/modules/history.mdx b/website/content/docs/modules/history.mdx
index e98910802..836fc12a3 100644
--- a/website/content/docs/modules/history.mdx
+++ b/website/content/docs/modules/history.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: History Module
---
@@ -35,10 +34,10 @@ var quill = new Quill('#editor', {
history: {
delay: 2000,
maxStack: 500,
- userOnly: true,
+ userOnly: true
},
},
- theme: 'snow',
+ theme: 'snow'
});
```
@@ -51,7 +50,7 @@ Clears the history stack.
**Methods**
```js
-clear();
+clear()
```
**Examples**
@@ -67,7 +66,7 @@ Normally changes made in short succession (configured by `delay`) are merged as
**Methods**
```js
-cutoff();
+cutoff()
```
**Examples**
@@ -83,7 +82,7 @@ Undo last change.
**Methods**
```js
-undo();
+undo()
```
**Examples**
@@ -99,7 +98,7 @@ If last change was an undo, redo this undo. Otherwise does nothing.
**Methods**
```js
-redo();
+redo()
```
**Examples**
diff --git a/website/content/docs/modules/keyboard.mdx b/website/content/docs/modules/keyboard.mdx
index 3db7ffc28..dec5e8779 100644
--- a/website/content/docs/modules/keyboard.mdx
+++ b/website/content/docs/modules/keyboard.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Keyboard Module
---
diff --git a/website/content/docs/modules/syntax.mdx b/website/content/docs/modules/syntax.mdx
index c9cc91a38..4311436cd 100644
--- a/website/content/docs/modules/syntax.mdx
+++ b/website/content/docs/modules/syntax.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Syntax Highlighter Module
---
diff --git a/website/content/docs/modules/toolbar.mdx b/website/content/docs/modules/toolbar.mdx
index 9478a11b8..6f8137582 100644
--- a/website/content/docs/modules/toolbar.mdx
+++ b/website/content/docs/modules/toolbar.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Toolbar Module
---
@@ -64,10 +63,10 @@ var quill = new Quill('#editor', {
toolbar: {
container: '#toolbar', // Selector for toolbar container
handlers: {
- bold: customBoldHandler,
- },
- },
- },
+ bold: customBoldHandler
+ }
+ }
+ }
});
```
@@ -77,8 +76,8 @@ Because the `container` option is so common, a top level shorthand is also allow
var quill = new Quill('#editor', {
modules: {
// Equivalent to { toolbar: { container: '#toolbar' }}
- toolbar: '#toolbar',
- },
+ toolbar: '#toolbar'
+ }
});
```
@@ -93,18 +92,15 @@ var toolbarOptions = ['bold', 'italic', 'underline', 'strike'];
var quill = new Quill('#editor', {
modules: {
- toolbar: toolbarOptions,
- },
+ toolbar: toolbarOptions
+ }
});
```
Controls can also be grouped by one level of nesting an array. This will wrap controls in a `` with class name `ql-formats`, providing structure for themes to utilize. For example [Snow](/docs/themes/#snow/) adds extra spacing between control groups.
```javascript
-var toolbarOptions = [
- ['bold', 'italic'],
- ['link', 'image'],
-];
+var toolbarOptions = [['bold', 'italic'], ['link', 'image']];
```
Buttons with custom values can be specified with an Object with the name of the format as its only key.
@@ -180,8 +176,8 @@ For use cases requiring even more customization, you can manually create a toolb
```
@@ -230,14 +226,14 @@ var toolbarOptions = {
} else {
this.quill.format('link', false);
}
- },
- },
+ }
+ }
};
var quill = new Quill('#editor', {
modules: {
- toolbar: toolbarOptions,
- },
+ toolbar: toolbarOptions
+ }
});
// Handlers can also be added post initialization
diff --git a/website/content/docs/quickstart.mdx b/website/content/docs/quickstart.mdx
index e4844e81a..825571245 100644
--- a/website/content/docs/quickstart.mdx
+++ b/website/content/docs/quickstart.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Quickstart
---
@@ -22,7 +21,7 @@ The best way to get started is to try a simple example. Quill is initialized wit
```
diff --git a/website/content/docs/themes.mdx b/website/content/docs/themes.mdx
index 72129b8d8..e4ae5aa9f 100644
--- a/website/content/docs/themes.mdx
+++ b/website/content/docs/themes.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Themes
---
diff --git a/website/content/guides/adding-quill-to-your-build-pipeline.mdx b/website/content/guides/adding-quill-to-your-build-pipeline.mdx
index a4bad1a2d..5686fd7a3 100644
--- a/website/content/guides/adding-quill-to-your-build-pipeline.mdx
+++ b/website/content/guides/adding-quill-to-your-build-pipeline.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Adding Quill to Your Build Pipeline
---
diff --git a/website/content/guides/building-a-custom-module.mdx b/website/content/guides/building-a-custom-module.mdx
index c6a07ebf8..7c9fdac6a 100644
--- a/website/content/guides/building-a-custom-module.mdx
+++ b/website/content/guides/building-a-custom-module.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Building a Custom Module
---
diff --git a/website/content/guides/cloning-medium-with-parchment.mdx b/website/content/guides/cloning-medium-with-parchment.mdx
index 7029da315..283e5e626 100644
--- a/website/content/guides/cloning-medium-with-parchment.mdx
+++ b/website/content/guides/cloning-medium-with-parchment.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Cloning Medium with Parchment
---
@@ -171,7 +170,7 @@ class ImageBlot extends BlockEmbed {
static value(node) {
return {
alt: node.getAttribute('alt'),
- url: node.getAttribute('src'),
+ url: node.getAttribute('src')
};
}
}
@@ -236,17 +235,15 @@ Note if you open your console and call [`getContents`](/docs/api/#getcontents),
```js
{
- ops: [
- {
- insert: {
- video: 'https://www.youtube.com/embed/QHH3iSeDBLo?showinfo=0',
- },
- attributes: {
- height: '170',
- width: '400',
- },
+ ops: [{
+ insert: {
+ video: 'https://www.youtube.com/embed/QHH3iSeDBLo?showinfo=0'
},
- ];
+ attributes: {
+ height: '170',
+ width: '400'
+ }
+ }]
}
```
diff --git a/website/content/guides/comparison-with-other-rich-text-editors.mdx b/website/content/guides/comparison-with-other-rich-text-editors.mdx
index 76a6c1c12..7bab9bb2e 100644
--- a/website/content/guides/comparison-with-other-rich-text-editors.mdx
+++ b/website/content/guides/comparison-with-other-rich-text-editors.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Comparison with Other Rich Text Editors
---
diff --git a/website/content/guides/designing-the-delta-format.mdx b/website/content/guides/designing-the-delta-format.mdx
index 4b7d5400c..657e3cf74 100644
--- a/website/content/guides/designing-the-delta-format.mdx
+++ b/website/content/guides/designing-the-delta-format.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Designing the Delta Format
---
diff --git a/website/content/guides/how-to-customize-quill.mdx b/website/content/guides/how-to-customize-quill.mdx
index eb02e254a..1d74f8339 100644
--- a/website/content/guides/how-to-customize-quill.mdx
+++ b/website/content/guides/how-to-customize-quill.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: How to Customize Quill
---
diff --git a/website/content/guides/upgrading-to-1-0.mdx b/website/content/guides/upgrading-to-1-0.mdx
index 116d6d513..967592655 100644
--- a/website/content/guides/upgrading-to-1-0.mdx
+++ b/website/content/guides/upgrading-to-1-0.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Upgrading to 1.0
---
diff --git a/website/content/guides/upgrading-to-2-0.mdx b/website/content/guides/upgrading-to-2-0.mdx
index ee0bd560e..79727b6e2 100644
--- a/website/content/guides/upgrading-to-2-0.mdx
+++ b/website/content/guides/upgrading-to-2-0.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Upgrading to 2.0
---
diff --git a/website/content/guides/why-quill.mdx b/website/content/guides/why-quill.mdx
index f371c1c7e..6574ee4dd 100644
--- a/website/content/guides/why-quill.mdx
+++ b/website/content/guides/why-quill.mdx
@@ -1,5 +1,4 @@
---
-layout: docs
title: Why Quill
---
diff --git a/website/gatsby-node.js b/website/gatsby-node.js
index f741bda35..b066d5422 100644
--- a/website/gatsby-node.js
+++ b/website/gatsby-node.js
@@ -120,7 +120,6 @@ exports.createPages = ({ graphql, actions }) => {
throw result.errors;
}
- // Create blog post pages.
result.data.allMdx.edges.forEach(({ node }) => {
const filePath = node.internal.contentFilePath;
const { pageType, slug } = node.fields;
diff --git a/website/package.json b/website/package.json
index a2b3242ff..ce247d12a 100644
--- a/website/package.json
+++ b/website/package.json
@@ -14,6 +14,7 @@
"dependencies": {
"@mdx-js/react": "^2.1.5",
"babel-preset-gatsby": "^2.24.0",
+ "classnames": "^2.3.2",
"gatsby-plugin-google-analytics": "^4.24.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
diff --git a/website/src/components/SEO.jsx b/website/src/components/SEO.jsx
index 7b9ddfc91..23d8ab19c 100644
--- a/website/src/components/SEO.jsx
+++ b/website/src/components/SEO.jsx
@@ -45,7 +45,7 @@ const SEO = ({ title, permalink }) => {
property="og:image"
content="https://quilljs.com/assets/images/brand-asset.png"
/>
-
+
{pageTitle}
diff --git a/website/src/html.js b/website/src/html.js
index b8d281118..5525db588 100644
--- a/website/src/html.js
+++ b/website/src/html.js
@@ -9,11 +9,18 @@ export default function HTML(props) {
-
+
+
+
+