├── demo ├── .gitkeep ├── screenshot.png └── index.html ├── .babelrc ├── src ├── scss │ ├── base.scss │ └── core │ │ ├── _variables.scss │ │ └── _styles.scss ├── quill-inline-comment.js └── module-inline-comment.js ├── .npmignore ├── .gitignore ├── CONTRIBUTING.md ├── dist ├── quill-inline-comment.css ├── index.html └── quill-inline-comment.js ├── bower.json ├── README.md ├── package.json └── webpack.config.js /demo/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { "presets": ["es2015"] } 2 | -------------------------------------------------------------------------------- /src/scss/base.scss: -------------------------------------------------------------------------------- 1 | @import 'core/styles'; -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log 3 | 4 | .DS_Store -------------------------------------------------------------------------------- /demo/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/contentco/quill-inline-comment/HEAD/demo/screenshot.png -------------------------------------------------------------------------------- /src/quill-inline-comment.js: -------------------------------------------------------------------------------- 1 | import css from './scss/base.scss'; 2 | import InlineComment from '../src/module-inline-comment'; -------------------------------------------------------------------------------- /src/scss/core/_variables.scss: -------------------------------------------------------------------------------- 1 | $white: #FFF; 2 | $blue: #0366d6; 3 | $cyan: #2D9EE0; 4 | $light-blue: #84a8cc; 5 | $light-gray: #ddd; -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Building 4 | 5 | To build __quill-inline-comment__, run the following command: 6 | 7 | ```npm run build``` 8 | 9 | ## Testing 10 | 11 | Still need to add testing 12 | 13 | ## Releases 14 | 15 | Still need to come up with release schemes 16 | 17 | ## Maintainers 18 | 19 | __@yeminhtut__ 20 | __@himynameistimli__ 21 | -------------------------------------------------------------------------------- /dist/quill-inline-comment.css: -------------------------------------------------------------------------------- 1 | body{background:#fff}#quill-editor{position:relative}.inline-comment{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.commentText{border:none;display:block;resize:none}.commentText:focus{outline:none}.inline-comment-bottom{margin-top:15px;text-align:right}.annotation{background:#a5caf2} -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quill-inline-comment", 3 | "version": "0.0.1", 4 | "description": "Quill Extension for Inline Comment Like Medium", 5 | "main": "webpack.config.js", 6 | "authors": [ 7 | "contentco" 8 | ], 9 | "license": "MIT", 10 | "keywords": [ 11 | "content", 12 | "emoji", 13 | "quill", 14 | "editor" 15 | ], 16 | "homepage": "https://github.com/contentco/quill-inline-comment", 17 | "ignore": [ 18 | "**/.*", 19 | "node_modules", 20 | "bower_components", 21 | "test", 22 | "tests" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /src/scss/core/_styles.scss: -------------------------------------------------------------------------------- 1 | @import 'core/variables'; /* sass-loader doesnt like absolute imports*/ 2 | body { 3 | background: $white; 4 | } 5 | #quill-editor { 6 | position: relative; 7 | } 8 | .inline-comment{ 9 | background-color: #fff; 10 | border: 1px solid #ccc; 11 | box-shadow: 0 0 5px #ddd; 12 | color: #444; 13 | padding: 5px 12px; 14 | white-space: nowrap; 15 | } 16 | .commentText{ 17 | border: none; 18 | display: block; 19 | resize: none; 20 | } 21 | .commentText:focus{ 22 | outline: none; 23 | } 24 | .inline-comment-bottom{ 25 | margin-top: 15px; 26 | text-align: right; 27 | } 28 | .annotation{ 29 | background: #a5caf2; 30 | } 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quill Inline Comment 2 | Module extension for [Quill.js](https://github.com/quilljs/quill) that handles inline comment like medium. 3 | 4 | #### This module is still in active development 5 | 6 | ## Usage 7 | ### Webpack/ES6 8 | 9 | ```javascript 10 | const toolbarOptions = { 11 | container: [ 12 | ['bold', 'italic', 'underline', 'strike'], 13 | ['comment'], 14 | ], 15 | handlers: {'comment': function() {}} 16 | } 17 | const quill = new Quill(editor, { 18 | // ... 19 | modules: { 20 | // ... 21 | toolbar: toolbarOptions, 22 | inline_comment: true 23 | } 24 | }); 25 | ``` 26 | 27 | ## Contributing 28 | 29 | Please check out our [contributing guidelines](CONTRIBUTING.md). 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quill-inline-comment", 3 | "version": "0.0.9", 4 | "description": "Quill Extension for Inline Comment", 5 | "main": "webpack.config.js", 6 | "devDependencies": { 7 | "babel-core": "^6.24.1", 8 | "babel-loader": "^6.4.1", 9 | "babel-preset-env": "^1.5.1", 10 | "babel-preset-es2015": "^6.24.1", 11 | "css-loader": "^0.27.3", 12 | "extract-text-webpack-plugin": "^2.1.0", 13 | "file-loader": "^0.11.2", 14 | "node-sass": "^4.5.3", 15 | "sass-loader": "^6.0.5", 16 | "uglifyjs-webpack-plugin": "^0.4.3", 17 | "url-loader": "^0.5.9", 18 | "webpack": "^2.6.1", 19 | "webpack-dev-server": "^2.4.5" 20 | }, 21 | "scripts": { 22 | "test": "npm test", 23 | "build": "webpack" 24 | }, 25 | "repository": { 26 | "type": "git", 27 | "url": "git+https://github.com/contentco/quill-inline-comment.git" 28 | }, 29 | "keywords": [ 30 | "content", 31 | "quill", 32 | "editor" 33 | ], 34 | "author": "contentco", 35 | "license": "MIT", 36 | "bugs": { 37 | "url": "https://github.com/contentco/quill-inline-comment/issues" 38 | }, 39 | "homepage": "https://github.com/contentco/quill-inline-comment#readme", 40 | "dependencies": { 41 | "babel": "^6.23.0", 42 | "preact": "^7.2.1", 43 | "quill": "^1.2.4" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const ExtractTextPlugin = require('extract-text-webpack-plugin'); 3 | const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); 4 | 5 | // const autoprefixer = requre('autoprefixer'); 6 | 7 | const config = { 8 | entry: './src/quill-inline-comment.js', 9 | output: { 10 | path: path.resolve(__dirname, 'dist'), 11 | filename: 'quill-inline-comment.js' 12 | }, 13 | devServer: { 14 | contentBase: path.join(__dirname), 15 | compress: true, 16 | port: 9000 17 | }, 18 | module: { 19 | rules: [ 20 | { 21 | test: /\.scss$/, 22 | use: ExtractTextPlugin.extract({ 23 | use: [{ 24 | loader: 'css-loader', 25 | options: { 26 | minimize: true || {/* CSSNano Options */} 27 | } 28 | }, { 29 | loader: 'sass-loader', 30 | }] 31 | }), 32 | }, 33 | { 34 | test: /\.js$/, 35 | include: [ 36 | path.resolve(__dirname, "src/") 37 | ], 38 | exclude: /(node_modules)/, 39 | use: { 40 | loader: 'babel-loader', 41 | options: { 42 | presets: [['es2015', {modules: false}],] 43 | } 44 | } 45 | }, 46 | { 47 | test: /\.png$/, 48 | loader: "file-loader" 49 | }, 50 | { 51 | test: /\.(png|woff|woff2|eot|ttf|svg)$/, 52 | loader: 'url-loader?limit=100000' 53 | } 54 | ] 55 | }, 56 | plugins: [ 57 | new ExtractTextPlugin('quill-inline-comment.css'), 58 | new UglifyJSPlugin({ 59 | compress: { 60 | warnings: false, 61 | screw_ie8: true, 62 | conditionals: true, 63 | unused: true, 64 | comparisons: true, 65 | sequences: true, 66 | dead_code: true, 67 | evaluate: true, 68 | join_vars: true, 69 | if_return: true 70 | }, 71 | output: { 72 | comments: false 73 | } 74 | }), 75 | ] 76 | }; 77 | 78 | module.exports = config; 79 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 31 | 32 | 33 |