[go: nahoru, domu]

Skip to content

Commit

Permalink
[5-handle-editor-scroll] fix eslint errors
Browse files Browse the repository at this point in the history
- Fix mixed tabs and spaces
- Allow modules to be referred to by name
- Update README to show new changes
- update image-resize.min.js
  • Loading branch information
kensnyder committed Apr 10, 2017
1 parent 33c41aa commit 9e5ecbd
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 18,022 deletions.
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
indent_style = tab
indent_size = 4
indent_size = 4

[*.json,*.eslintrc]
indent_style = space
indent_size = 2
22 changes: 13 additions & 9 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "airbnb",
"env": {
"browser": true,
"node": true,
Expand All @@ -17,13 +16,18 @@
}
},
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"max-len": 0
"comma-dangle": [2, "always-multiline"],
"default-case": 1,
"dot-notation": 1,
"no-cond-assign": 1,
"no-constant-condition": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-fallthrough": 2,
"no-lone-blocks": 1,
"no-loop-func": 1,
"no-redeclare": 1,
"no-unused-vars": 1,
"no-use-before-define": 0
}
}
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const quill = new Quill(editor, {
modules: {
// ...
imageResize: {
// See "config" below
// See optional "config" below
}
}
});
Expand All @@ -44,7 +44,7 @@ var quill = new Quill(editor, {
modules: {
// ...
ImageResize: {
// See "config" below
// See optional "config" below
}
}
});
Expand All @@ -63,24 +63,22 @@ var quill = new Quill(editor, {
});
```

Functionality is broken down into modules, which can be mixed and matched as you like. For example, if you
want to explicitly include all the currently available modules, you could do:
Functionality is broken down into modules, which can be mixed and matched as you like. For example,
the default is to include all modules:

```javascript
import { DisplaySize, Toolbar, Resize } from 'quill-image-resize-module';

const quill = new Quill(editor, {
// ...
modules: {
// ...
ImageResize: {
modules: [ Resize, DisplaySize, Toolbar ] // ALL THE MODULES
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
}
}
});
```

Each module will be described below.
Each module is described below.

#### `Resize` - Resize the image

Expand Down Expand Up @@ -150,15 +148,10 @@ var quill = new Quill(editor, {
// other camelCase styles for size display
},
toolbarButtonStyles: {
alignLeft: {
// ...
},
alignCenter: {
// ...
},
alignRight: {
// ...
}
// ...
},
toolbarButtonSvgStyles: {
// ...
},
}
}
Expand Down
Loading

0 comments on commit 9e5ecbd

Please sign in to comment.