Skip to content

Commit

Permalink
Minor content fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Oct 28, 2022
1 parent e693722 commit a43c10d
Show file tree
Hide file tree
Showing 34 changed files with 68 additions and 95 deletions.
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"website"
],
"dependencies": {
"classnames": "^2.3.2",
"eventemitter3": "^4.0.7",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"module": "es6",
"moduleResolution": "node"
},
"include": ["./**/*"],
"exclude": ["./website/**/*"]
"include": ["./**/*"]
}
2 changes: 1 addition & 1 deletion website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules

# Gatsby files
/.cache/
/public
/public
28 changes: 13 additions & 15 deletions website/content/blog/a-new-delta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
]
};
```

Expand All @@ -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' }
}]
};
```

Expand Down
2 changes: 0 additions & 2 deletions website/content/blog/an-official-cdn-for-quill.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ You can also use "latest" as the version:
```html
<script src="//cdn.quilljs.com/latest/quill.min.js"></script>
```

{/* more */}
2 changes: 0 additions & 2 deletions website/content/blog/the-state-of-quill-and-2-0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 */}
1 change: 0 additions & 1 deletion website/content/docs/api.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: API
---

Expand Down
1 change: 0 additions & 1 deletion website/content/docs/configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Configuration
---

Expand Down
17 changes: 8 additions & 9 deletions website/content/docs/delta.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Delta
---

Expand All @@ -20,8 +19,8 @@ The Delta format is almost entirely self-explanatory&mdash;the example below des
ops: [
{ insert: 'Gandalf', attributes: { bold: true } },
{ insert: ' the ' },
{ insert: 'Grey', attributes: { color: '#cccccc' } },
];
{ insert: 'Grey', attributes: { color: '#cccccc' } }
]
}
```

Expand Down Expand Up @@ -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' }
]
}
```

Expand All @@ -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
]
}
```

Expand Down Expand Up @@ -110,8 +109,8 @@ Starting with the above "Gandalf the Grey" example:
{ insert: 'White', attributes: { color: '#fff' } },

// Delete "Grey"
{ delete: 4 },
];
{ delete: 4 }
]
}
```

Expand Down
1 change: 0 additions & 1 deletion website/content/docs/download.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Download
---

Expand Down
1 change: 0 additions & 1 deletion website/content/docs/formats.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Formats
---

Expand Down
1 change: 0 additions & 1 deletion website/content/docs/modules.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Modules
---

Expand Down
1 change: 0 additions & 1 deletion website/content/docs/modules/clipboard.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Clipboard Module
---

Expand Down
13 changes: 6 additions & 7 deletions website/content/docs/modules/history.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: History Module
---

Expand Down Expand Up @@ -35,10 +34,10 @@ var quill = new Quill('#editor', {
history: {
delay: 2000,
maxStack: 500,
userOnly: true,
userOnly: true
},
},
theme: 'snow',
theme: 'snow'
});
```

Expand All @@ -51,7 +50,7 @@ Clears the history stack.
**Methods**

```js
clear();
clear()
```

**Examples**
Expand All @@ -67,7 +66,7 @@ Normally changes made in short succession (configured by `delay`) are merged as
**Methods**

```js
cutoff();
cutoff()
```

**Examples**
Expand All @@ -83,7 +82,7 @@ Undo last change.
**Methods**

```js
undo();
undo()
```

**Examples**
Expand All @@ -99,7 +98,7 @@ If last change was an undo, redo this undo. Otherwise does nothing.
**Methods**

```js
redo();
redo()
```

**Examples**
Expand Down
1 change: 0 additions & 1 deletion website/content/docs/modules/keyboard.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Keyboard Module
---

Expand Down
1 change: 0 additions & 1 deletion website/content/docs/modules/syntax.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Syntax Highlighter Module
---

Expand Down
34 changes: 15 additions & 19 deletions website/content/docs/modules/toolbar.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Toolbar Module
---

Expand Down Expand Up @@ -64,10 +63,10 @@ var quill = new Quill('#editor', {
toolbar: {
container: '#toolbar', // Selector for toolbar container
handlers: {
bold: customBoldHandler,
},
},
},
bold: customBoldHandler
}
}
}
});
```

Expand All @@ -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'
}
});
```

Expand All @@ -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 `<span>` 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.
Expand Down Expand Up @@ -180,8 +176,8 @@ For use cases requiring even more customization, you can manually create a toolb
<script>
var quill = new Quill('#editor', {
modules: {
toolbar: '#toolbar',
},
toolbar: '#toolbar'
}
});
</script>
```
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions website/content/docs/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Quickstart
---

Expand All @@ -22,7 +21,7 @@ The best way to get started is to try a simple example. Quill is initialized wit
<!-- Initialize Quill editor -->
<script>
var quill = new Quill('#editor', {
theme: 'snow',
theme: 'snow'
});
</script>
```
Expand Down
1 change: 0 additions & 1 deletion website/content/docs/themes.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Themes
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Adding Quill to Your Build Pipeline
---

Expand Down
1 change: 0 additions & 1 deletion website/content/guides/building-a-custom-module.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: docs
title: Building a Custom Module
---

Expand Down
Loading

0 comments on commit a43c10d

Please sign in to comment.