Skip to content

Commit

Permalink
Merge remote-tracking branch 'original/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Nieh committed Aug 23, 2016
2 parents 9cf7c2e + d2ac13d commit ffb47ec
Show file tree
Hide file tree
Showing 29 changed files with 297 additions and 131 deletions.
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
# 1.0.0-rc.1

A few bug fixes and performance improvements.

### Features

- Source maps now available from CDN for minified build

### Bug Fixes

- Fix scroll interaction between two Quill editors [#855](https://github.com/quilljs/quill/issues/855)
- Fix scroll on paste [#856](https://github.com/quilljs/quill/issues/856)
- Fix native iOS tooltip formatting [#862](https://github.com/quilljs/quill/issues/862)
- Remove comments from pasting from Word [#872](https://github.com/quilljs/quill/issues/872)
- Fix indent at all supported indent levels [#873](https://github.com/quilljs/quill/issues/873)
- Fix indent interaction with text direction [#874](https://github.com/quilljs/quill/issues/874)

Thank you [@benbro](https://github.com/benbro), [@fernandogmar](https://github.com/fernandogmar), [@sachinrekhi](https://github.com/sachinrekhi), [@sferoze](https://github.com/sferoze), and [@stalniy](https://github.com/stalniy) for contributions to this release!


# 1.0.0-rc.0

Take a look at [Quill 1.0 Release Candidate](https://quilljs.com/blog/quill-1-0-release-candidate-released/) for more details.

### Updates

- Going forward the minimal stylesheet build will be named quill.core.css, instead of quill.css

### Bug Fixes

- Fix identifying ordered and bulletd lists [#846](https://github.com/quilljs/quill/issues/846) [#847](https://github.com/quilljs/quill/issues/847)
- Fix bullet interaction with text direction [#848](https://github.com/quilljs/quill/issues/848)

A huge thank you to all contributors to through the beta! Special thanks goes to [@benbro](https://github.com/benbro) and [@sachinrekhi](https://github.com/sachinrekhi) who together submitted submitted almost 50 Issues and Pull Requests!

- [@abejdaniels](https://github.com/abejdaniels)
- [@anovi](https://github.com/anovi)
- [@benbro](https://github.com/benbro)
- [@bram2w](https://github.com/bram2w)
- [@brynjagr](https://github.com/brynjagr)
- [@CapTec](https://github.com/CapTec)
- [@Cinamonas](https://github.com/Cinamonas)
- [@clemmy](https://github.com/clemmy)
- [@crisbeto](https://github.com/crisbeto)
- [@cutteroid](https://github.com/cutteroid)
- [@DadaMonad](https://github.com/DadaMonad)
- [@davelozier](https://github.com/davelozier)
- [@emanuelbsilva](https://github.com/emanuelbsilva)
- [@ersommer](https://github.com/ersommer)
- [@fernandogmar](https://github.com/fernandogmar)
- [@george-norris-salesforce](https://github.com/george-norris-salesforce)
- [@jackmu95](https://github.com/jackmu95)
- [@jasonmng](https://github.com/jasonmng)
- [@jbrowning](https://github.com/jbrowning)
- [@jonnolen](https://github.com/jonnolen)
- [@KameSama](https://github.com/KameSama)
- [@kei-ito](https://github.com/kei-ito)
- [@kylebragger](https://github.com/kylebragger)
- [@LucVanPelt](https://github.com/LucVanPelt)
- [@lukechapman](https://github.com/lukechapman)
- [@micimize](https://github.com/micimize)
- [@mmorearty](https://github.com/mmorearty)
- [@mshamaiev-intel471](https://github.com/mshamaiev-intel471)
- [@quentez](https://github.com/quentez)
- [@sachinrekhi](https://github.com/sachinrekhi)
- [@sagacitysite](https://github.com/sagacitysite)
- [@saw](https://github.com/saw)
- [@stalniy](https://github.com/stalniy)
- [@tOgg1](https://github.com/tOgg1)
- [@u9520107](https://github.com/u9520107)
- [@WriterStat](https://github.com/WriterStat)


# 1.0.0-beta.11

Fixed some regressive bugs from previous release.
Expand Down
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

Quill is a modern rich text editor built for compatibility and extensibility. It was created by [Jason Chen](https://twitter.com/jhchen) and [Byron Milligan](https://twitter.com/byronmilligan) and open sourced by [Salesforce.com](http://www.salesforce.com).

To get started, check out the [Quill Github Page](http://quilljs.com/) or jump straight into the [demo](http://quilljs.com/examples/).
To get started, check out the [Quill website](http://quilljs.com/) for documentation, guides, and live demos!


## Useful Links

- [Demo](https://quilljs.com/examples/)
- [Documentation](https://quilljs.com/)
- [Demo](https://quilljs.com/)
- [Documentation](https://quilljs.com/docs/)
- [How-to Guides](https://quilljs.com/guides/)
- [Interactive Playground](https://quilljs.com/playground/)
- [Contributing](https://github.com/quilljs/quill/blob/master/.github/CONTRIBUTING.md)
- [Local Development](https://github.com/quilljs/quill/blob/master/.github/DEVELOPMENT.md)

Expand All @@ -21,7 +23,7 @@ Instantiate a new Quill object with a css selector for the div that should becom

```html
<!-- Include Quill stylesheet -->
<link href="http://cdn.quilljs.com/1.0.0-beta.2/quill.snow.css" rel="stylesheet">
<link href="http://cdn.quilljs.com/1.0.0-rc.0/quill.snow.css" rel="stylesheet">

<!-- Create the toolbar container -->
<div id="toolbar">
Expand All @@ -35,7 +37,7 @@ Instantiate a new Quill object with a css selector for the div that should becom
</div>

<!-- Include the Quill library -->
<script src="http://cdn.quilljs.com/1.0.0-beta.2/quill.js"></script>
<script src="http://cdn.quilljs.com/1.0.0-rc.0/quill.js"></script>

<!-- Initialize Quill editor -->
<script>
Expand All @@ -46,20 +48,29 @@ Instantiate a new Quill object with a css selector for the div that should becom
</script>
```

Take a look at the [Quill website](https://quilljs.com/) for more documentation, guides and live demos!


## Download

- [npm](https://www.npmjs.com/package/quill) - `npm install quill`
- tar - https://github.com/quilljs/quill/releases


### CDN

```html
<link href="//cdn.quilljs.com/0.19.10/quill.css" rel="stylesheet">
<link href="//cdn.quilljs.com/0.19.10/quill.snow.css" rel="stylesheet">
<link href="//cdn.quilljs.com/0.19.10/quill.bubble.css" rel="stylesheet">
<script src="//cdn.quilljs.com/0.19.10/quill.js" type="text/javascript"></script>
<script src="//cdn.quilljs.com/0.19.10/quill.min.js" type="text/javascript"></script>
<!-- Main Quill library -->
<script src="//cdn.quilljs.com/1.0.0-rc.0/quill.js" type="text/javascript"></script>
<script src="//cdn.quilljs.com/1.0.0-rc.0/quill.min.js" type="text/javascript"></script>

<!-- Theme included stylesheets -->
<link href="//cdn.quilljs.com/1.0.0-rc.0/quill.snow.css" rel="stylesheet">
<link href="//cdn.quilljs.com/1.0.0-rc.0/quill.bubble.css" rel="stylesheet">

<!-- Core build with no theme, formatting, non-essential modules -->
<link href="//cdn.quilljs.com/1.0.0-rc.0/quill.core.css" rel="stylesheet">
<script src="//cdn.quilljs.com/1.0.0-rc.0/quill.core.js" type="text/javascript"></script>
```


Expand All @@ -68,7 +79,7 @@ Instantiate a new Quill object with a css selector for the div that should becom
Get help or stay up to date.

- [Contribute](https://github.com/quilljs/quill/blob/develop/.github/CONTRIBUTING.md) on [Issues](https://github.com/quilljs/quill/issues)
- Follow [@quilljs](https://twitter.com/quilljs) on Twitter
- Follow [@jhchen](https://twitter.com/jhchen) and [@quilljs](https://twitter.com/quilljs) on Twitter
- Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/quill)
- If privacy is required, email support@quilljs.com

Expand Down
1 change: 1 addition & 0 deletions _develop/jekyll.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cdn: /
quill: quill.js
3 changes: 2 additions & 1 deletion _develop/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ var ports = {

var server = http.createServer(function(req, res) {
if (/\/\d+\.\d+\.\d+/.test(req.url) || req.url.startsWith('/karma/base/dist')) {
var target = 'http://localhost:' + ports.webpack + '/' + req.url.split('/').pop();
proxy.web(req, res, {
ignorePath: true,
target: 'http://localhost:' + ports.webpack + '/' + req.url.split('/').pop()
target: target
});
} else if (req.url.startsWith('/karma') || req.url === '/assets/favicon.png') {
proxy.web(req, res, { ignorePath: false, target: { port: ports.karma } });
Expand Down
6 changes: 3 additions & 3 deletions _develop/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ mkdir .release
mkdir .release/quill

npm run build
cp dist/quill.css dist/quill.bubble.css dist/quill.snow.css dist/quill.js .release/quill/
uglifyjs .release/quill/quill.js > .release/quill/quill.min.js
webpack --minimize --config _develop/webpack.config.js
cp dist/quill.core.css dist/quill.bubble.css dist/quill.snow.css dist/quill.js dist/quill.core.js .release/quill/

cd .release

printf "cdn: .\nversion: ." > jekyll.yml
printf "cdn: .\nversion: .\nquill: quill.js" > jekyll.yml
jekyll build -s ../node_modules/quill-docs -d _site --config ../node_modules/quill-docs/_config.yml,jekyll.yml

mkdir quill/examples
Expand Down
51 changes: 45 additions & 6 deletions _develop/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ var constantPack = new webpack.DefinePlugin({
QUILL_VERSION: JSON.stringify(pkg.version)
});


module.exports = {
context: path.resolve(__dirname, '..'),
entry: {
'quill.js': ['./quill.js'],
'quill': './assets/core.styl',
'quill': ['./quill.js'],
'quill.core': [
'./core.js',
'./assets/core.styl'
],
'quill.bubble': './assets/bubble.styl',
'quill.snow': './assets/snow.styl',
'unit.js': './test/unit.js'
'unit': './test/unit.js'
},
output: {
filename: '[name]',
filename: '[name].js',
library: 'Quill',
libraryTarget: 'umd',
path: 'dist/'
Expand Down Expand Up @@ -63,8 +67,11 @@ module.exports = {
},
silent: true
},
plugins: [ bannerPack, constantPack, new ExtractTextPlugin('[name].css', { allChunks: true }) ],
devtool: 'source-map',
plugins: [
bannerPack,
constantPack,
new ExtractTextPlugin('[name].css', { allChunks: true })
],
devServer: {
hot: false,
port: process.env.npm_package_config_ports_webpack,
Expand All @@ -80,3 +87,35 @@ module.exports = {
}
}
};

if (process.argv.indexOf('--coverage') !== -1) {
module.exports.module.postLoaders = [{
test: /\.js$/,
loader: 'istanbul-instrumenter',
exclude: [
path.resolve(__dirname, '..', 'node_modules'),
path.resolve(__dirname, '..', 'test'),
path.resolve(__dirname, '..', 'core/polyfill.js'),
path.resolve(__dirname, '..', 'core.js'),
path.resolve(__dirname, '..', 'quill.js')
]
}];
module.exports.module.loaders[3].query = {
plugins: ['transform-es2015-modules-commonjs']
};
}

if (process.argv.indexOf('--minimize') !== -1) {
module.exports.entry = {
'quill.min': './quill.js'
};
module.exports.plugins.push(
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
);
module.exports.devtool = 'source-map';
}
19 changes: 0 additions & 19 deletions _develop/webpack.coverage.js

This file was deleted.

13 changes: 9 additions & 4 deletions assets/core.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LIST_STYLE = decimal lower-alpha lower-roman
LIST_STYLE_WIDTH = 15px
LIST_STYLE_MARGIN = 4px
LIST_STYLE_OUTER_WIDTH = LIST_STYLE_MARGIN + LIST_STYLE_WIDTH
MAX_INDENT = 8
MAX_INDENT = 9

resets(arr)
unquote('list-' + join(' list-', arr))
Expand Down Expand Up @@ -53,11 +53,12 @@ resets(arr)
content: '\25CF'
li::before
display: inline-block
margin-left: -1*LIST_STYLE_OUTER_WIDTH
margin-right: LIST_STYLE_MARGIN
text-align: right
white-space: nowrap
width: LIST_STYLE_WIDTH
li:not(.ql-direction-rtl)::before
margin-left: -1*LIST_STYLE_OUTER_WIDTH
ol, ul
li
padding-left: LIST_STYLE_OUTER_WIDTH
Expand All @@ -76,10 +77,14 @@ resets(arr)
li.ql-indent-{num}
counter-reset: resets((num+1)..MAX_INDENT)
for num in (1..MAX_INDENT)
.ql-indent-{num}
.ql-indent-{num}:not(.ql-direction-rtl)
padding-left: (40*num)px
li.ql-indent-{num}
li.ql-indent-{num}:not(.ql-direction-rtl)
padding-left: (40*num + LIST_STYLE_OUTER_WIDTH)px
.ql-indent-{num}.ql-direction-rtl.ql-align-right
padding-right: (40*num)px
li.ql-indent-{num}.ql-direction-rtl.ql-align-right
padding-right: (40*num + LIST_STYLE_OUTER_WIDTH)px

.ql-video
display: block
Expand Down
1 change: 0 additions & 1 deletion blots/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class Cursor extends Embed {
this.domNode.parentNode.insertBefore(this.domNode.lastChild, this.domNode);
}
if (this.textNode.data !== Cursor.CONTENTS) {
let native = this.selection.getNativeRange();
this.textNode.data = this.textNode.data.split(Cursor.CONTENTS).join('');
this.parent.insertBefore(Parchment.create(this.textNode), this);
this.textNode = document.createTextNode(Cursor.CONTENTS);
Expand Down
12 changes: 11 additions & 1 deletion blots/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ import Parchment from 'parchment';

class Inline extends Parchment.Inline {
static compare(self, other) {
return Inline.order.indexOf(self) - Inline.order.indexOf(other);
let selfIndex = Inline.order.indexOf(self);
let otherIndex = Inline.order.indexOf(other);
if (selfIndex >= 0 || otherIndex >= 0) {
return selfIndex - otherIndex;
} else if (self === other) {
return 0;
} else if (self < other) {
return -1;
} else {
return 1;
}
}

formatAt(index, length, name, value) {
Expand Down
10 changes: 3 additions & 7 deletions blots/scroll.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import Parchment from 'parchment';
import Emitter from '../core/emitter';
import logger from '../core/logger';
import Block, { BlockEmbed } from './block';
import Container from './container';


let debug = logger('quill:scroll');


function isLine(blot) {
return (blot instanceof Block || blot instanceof BlockEmbed);
}
Expand All @@ -27,10 +23,10 @@ class Scroll extends Parchment.Scroll {
}

deleteAt(index, length) {
let [first, firstOffset] = this.line(index);
let [last, lastOffset] = this.line(index + length);
let [first, offset] = this.line(index);
let [last, ] = this.line(index + length);
super.deleteAt(index, length);
if (last != null && first !== last && firstOffset > 0 &&
if (last != null && first !== last && offset > 0 &&
!(first instanceof BlockEmbed) && !(last instanceof BlockEmbed)) {
last.moveChildren(first);
last.remove();
Expand Down
2 changes: 1 addition & 1 deletion core.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Quill.register({
Parchment.register(Block, Break, Cursor, Inline, Scroll, TextBlot);


export default Quill;
module.exports = Quill;
Loading

0 comments on commit ffb47ec

Please sign in to comment.