├── bower.json ├── package.json ├── dist ├── autolist.min.js └── autolist.js ├── README.md ├── bower_components └── medium-editor │ ├── bower.json │ ├── dist │ ├── css │ │ ├── themes │ │ │ ├── flat.min.css │ │ │ ├── roman.min.css │ │ │ ├── mani.min.css │ │ │ ├── bootstrap.min.css │ │ │ ├── default.min.css │ │ │ ├── tim.min.css │ │ │ ├── beagle.min.css │ │ │ ├── flat.css │ │ │ ├── roman.css │ │ │ ├── mani.css │ │ │ ├── default.css │ │ │ ├── bootstrap.css │ │ │ ├── tim.css │ │ │ └── beagle.css │ │ ├── medium-editor.min.css │ │ └── medium-editor.css │ └── js │ │ └── medium-editor.min.js │ ├── .bower.json │ ├── LICENSE │ ├── CUSTOM-EVENTS.md │ ├── API.md │ ├── OPTIONS.md │ └── README.md └── example ├── index.html └── css └── demo.css /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "medium-editor-autolist", 3 | "authors": [ 4 | "Varun Raj " 5 | ], 6 | "description": "An extension for medium editor which auto creates list.", 7 | "main": "dist/autolist.js", 8 | "moduleType": [], 9 | "keywords": [ 10 | "medium-editor", 11 | "extension", 12 | "autolist" 13 | ], 14 | "license": "MIT", 15 | "homepage": "", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "test", 21 | "tests" 22 | ], 23 | "dependencies": { 24 | "medium-editor": "^5.14.4" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "medium-editor-autolist", 3 | "version": "1.0.0", 4 | "description": "An extension for medium editor which auto creates list.", 5 | "main": "dist/autolist.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/gruberro/medium-editor-autolist.git" 9 | }, 10 | "keywords": [ 11 | "medium-editor", 12 | "extension", 13 | "autolist" 14 | ], 15 | "author": "Varun Raj ", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/gruberro/medium-editor-autolist/issues" 19 | }, 20 | "homepage": "https://github.com/gruberro/medium-editor-autolist#readme" 21 | } 22 | -------------------------------------------------------------------------------- /dist/autolist.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"use strict";"object"==typeof module?module.exports=t:"function"==typeof define&&define.amd?define(t):e.AutoList=t}(this,function(e){var t=e.Extension.extend({name:"autolist",init:function(){this.subscribe("editableInput",this.onInput.bind(this))},onInput:function(e){var t=this.base.getSelectedParentElement().textContent;/^\s*1\.\s/.test(t)&&this.base.getExtensionByName("orderedlist")?(this.base.execAction("delete"),this.base.execAction("delete"),this.base.execAction("delete"),this.base.execAction("insertorderedlist")):/^\s*\*\s/.test(t)&&this.base.getExtensionByName("unorderedlist")&&(this.base.execAction("delete"),this.base.execAction("delete"),this.base.execAction("insertunorderedlist"))}});return t}("function"==typeof require?require("medium-editor"):MediumEditor)); 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Autolist Extension for [Medium Editor](https://github.com/yabwe/medium-editor) 2 | ### Simple implementation 3 | 4 | **Installation** 5 | 6 | ```sh 7 | bower install medium-editor-autolist --save 8 | ``` 9 | 10 | **Import the javascript** 11 | 12 | ``` 13 | 14 | 15 | ``` 16 | **Add the extension** 17 | 18 | ```javascript 19 | var autolist = new AutoList(); 20 | var editor = new MediumEditor('.editable', { 21 | buttonLabels: 'fontawesome', 22 | extensions: { 23 | 'autolist': autolist 24 | }, 25 | toolbar: { 26 | buttons: ['h1', 'h2', 'bold', 'italic', 'quote', 'pre', 'unorderedlist','orderedlist'] 27 | } 28 | }), 29 | ``` 30 | 31 | 32 | -------------------------------------------------------------------------------- /bower_components/medium-editor/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "medium-editor", 3 | "homepage": "http://yabwe.github.io/medium-editor/", 4 | "authors": [ 5 | "Davi Ferreira ", 6 | "Nate Mielnik ", 7 | "Noah Chase ", 8 | "Jeremy Benoist " 9 | ], 10 | "description": "Medium.com WYSIWYG editor clone written in pure JavaScript.", 11 | "main": ["dist/js/medium-editor.js", 12 | "dist/css/medium-editor.css", 13 | "dist/css/themes/default.css"], 14 | "keywords": [ 15 | "contenteditable", 16 | "wysiwyg", 17 | "medium", 18 | "rich-text", 19 | "editor" 20 | ], 21 | "license": "MIT", 22 | "ignore": [ 23 | "**/.*", 24 | "node_modules", 25 | "bower_components", 26 | "spec", 27 | "coverage", 28 | "reports", 29 | "_SpecRunner.html", 30 | "Gruntfile.js", 31 | "demo", 32 | "package.json", 33 | "src", 34 | "CHANGES.md", 35 | "RELEASE-PROCESS.md", 36 | "CODE_OF_CONDUCT.md", 37 | "CONTRIBUTING.md", 38 | "UPGRADE-5.md" 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /dist/autolist.js: -------------------------------------------------------------------------------- 1 | (function (root, factory) { 2 | 'use strict'; 3 | if (typeof module === 'object') { 4 | module.exports = factory; 5 | } else if (typeof define === 'function' && define.amd) { 6 | define(factory); 7 | } else { 8 | root.AutoList = factory; 9 | } 10 | }(this, function (MediumEditor) { 11 | 12 | var AutoList = MediumEditor.Extension.extend({ 13 | name: 'autolist', 14 | init: function(){ 15 | this.subscribe('editableInput', this.onInput.bind(this)); 16 | }, 17 | onInput: function (evt) { 18 | var list_start = this.base.getSelectedParentElement().textContent; 19 | if (/^\s*1\.\s/.test(list_start) && this.base.getExtensionByName('orderedlist')){ 20 | this.base.execAction('delete'); 21 | this.base.execAction('delete'); 22 | this.base.execAction('delete'); 23 | this.base.execAction('insertorderedlist'); 24 | } 25 | else if (/^\s*\*\s/.test(list_start) && this.base.getExtensionByName('unorderedlist')){ 26 | this.base.execAction('delete'); 27 | this.base.execAction('delete'); 28 | this.base.execAction('insertunorderedlist'); 29 | } 30 | } 31 | }); 32 | 33 | return AutoList; 34 | 35 | }(typeof require === 'function' ? require('medium-editor') : MediumEditor))); 36 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/flat.min.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after{top:60px;border-color:#57ad68 transparent transparent}.medium-toolbar-arrow-over:before{top:-8px;border-color:transparent transparent #57ad68}.medium-editor-toolbar{background-color:#57ad68}.medium-editor-toolbar li{padding:0}.medium-editor-toolbar li button{min-width:60px;height:60px;border:none;border-right:1px solid #9ccea6;background-color:transparent;color:#fff;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#346a3f;color:#fff}.medium-editor-toolbar li .medium-editor-button-active{background-color:#23482a;color:#fff}.medium-editor-toolbar li .medium-editor-button-last{border-right:none}.medium-editor-toolbar-form .medium-editor-toolbar-input{height:60px;background:#57ad68;color:#fff}.medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-placeholder:after,.medium-editor-toolbar-form a{color:#fff}.medium-editor-toolbar-anchor-preview{background:#57ad68;color:#fff} -------------------------------------------------------------------------------- /bower_components/medium-editor/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "medium-editor", 3 | "homepage": "http://yabwe.github.io/medium-editor/", 4 | "authors": [ 5 | "Davi Ferreira ", 6 | "Nate Mielnik ", 7 | "Noah Chase ", 8 | "Jeremy Benoist " 9 | ], 10 | "description": "Medium.com WYSIWYG editor clone written in pure JavaScript.", 11 | "main": [ 12 | "dist/js/medium-editor.js", 13 | "dist/css/medium-editor.css", 14 | "dist/css/themes/default.css" 15 | ], 16 | "keywords": [ 17 | "contenteditable", 18 | "wysiwyg", 19 | "medium", 20 | "rich-text", 21 | "editor" 22 | ], 23 | "license": "MIT", 24 | "ignore": [ 25 | "**/.*", 26 | "node_modules", 27 | "bower_components", 28 | "spec", 29 | "coverage", 30 | "reports", 31 | "_SpecRunner.html", 32 | "Gruntfile.js", 33 | "demo", 34 | "package.json", 35 | "src", 36 | "CHANGES.md", 37 | "RELEASE-PROCESS.md", 38 | "CODE_OF_CONDUCT.md", 39 | "CONTRIBUTING.md", 40 | "UPGRADE-5.md" 41 | ], 42 | "version": "5.14.4", 43 | "_release": "5.14.4", 44 | "_resolution": { 45 | "type": "version", 46 | "tag": "5.14.4", 47 | "commit": "4da34843ebd1a8abf0957b953e3c78053142e4e0" 48 | }, 49 | "_source": "git://github.com/daviferreira/medium-editor.git", 50 | "_target": "^5.14.4", 51 | "_originalSource": "medium-editor", 52 | "_direct": true 53 | } -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/roman.min.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{display:none}.medium-editor-toolbar{background-color:#fff;background-color:rgba(255,255,255,.95);border-radius:5px;box-shadow:0 2px 6px rgba(0,0,0,.45)}.medium-editor-toolbar li button{min-width:50px;height:50px;border:none;border-right:1px solid #a8a8a8;background-color:transparent;color:#889aac;box-shadow:inset 0 0 3px #f8f8e6;background:-webkit-linear-gradient(top,#fff,rgba(0,0,0,.2));background:linear-gradient(to bottom,#fff,rgba(0,0,0,.2));text-shadow:1px 4px 6px #def,0 0 0 #000,1px 4px 6px #def;-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#fff;color:#fff;color:rgba(0,0,0,.8)}.medium-editor-toolbar li .medium-editor-button-first{border-top-left-radius:5px;border-bottom-left-radius:5px}.medium-editor-toolbar li .medium-editor-button-last{border-top-right-radius:5px;border-bottom-right-radius:5px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#ccc;color:#000;color:rgba(0,0,0,.8);background:-webkit-linear-gradient(bottom,#fff,rgba(0,0,0,.1));background:linear-gradient(to top,#fff,rgba(0,0,0,.1))}.medium-editor-toolbar-form{background:#fff;color:#999;border-radius:5px}.medium-editor-toolbar-form .medium-editor-toolbar-input{margin:0;height:50px;background:#fff;color:#a8a8a8}.medium-editor-toolbar-form a{color:#889aac}.medium-editor-toolbar-anchor-preview{background:#fff;color:#889aac;border-radius:5px}.medium-editor-placeholder:after{color:#a8a8a8} -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/mani.min.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{display:none}.medium-editor-toolbar{border:1px solid #cdd6e0;background-color:#dee7f0;background-color:rgba(222,231,240,.95);background:-webkit-linear-gradient(bottom,#dee7f0,#fff);background:linear-gradient(to top,#dee7f0,#fff);border-radius:2px;box-shadow:0 2px 6px rgba(0,0,0,.45)}.medium-editor-toolbar li button{min-width:50px;height:50px;border:none;border-right:1px solid #cdd6e0;background-color:transparent;color:#40648a;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#5c90c7;background-color:rgba(92,144,199,.45);color:#fff}.medium-editor-toolbar li .medium-editor-button-first{border-top-left-radius:2px;border-bottom-left-radius:2px}.medium-editor-toolbar li .medium-editor-button-last{border-top-right-radius:2px;border-bottom-right-radius:2px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#5c90c7;background-color:rgba(92,144,199,.45);color:#000;background:-webkit-linear-gradient(top,#dee7f0,rgba(0,0,0,.1));background:linear-gradient(to bottom,#dee7f0,rgba(0,0,0,.1))}.medium-editor-toolbar-form{background:#dee7f0;color:#999;border-radius:2px}.medium-editor-toolbar-form .medium-editor-toolbar-input{height:50px;background:#dee7f0;color:#40648a;box-sizing:border-box}.medium-editor-toolbar-form a{color:#40648a}.medium-editor-toolbar-anchor-preview{background:#dee7f0;color:#40648a;border-radius:2px}.medium-editor-placeholder:after{color:#cdd6e0} -------------------------------------------------------------------------------- /bower_components/medium-editor/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Davi Ferreira, http://www.daviferreira.com/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/yabwe/medium-editor 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules directory are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/bootstrap.min.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after{border-color:#428bca transparent transparent;top:60px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #428bca}.medium-editor-toolbar{background-color:#428bca;border:1px solid #357ebd;border-radius:4px}.medium-editor-toolbar li button{background-color:transparent;border:none;border-right:1px solid #357ebd;box-sizing:border-box;color:#fff;height:60px;min-width:60px;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li .medium-editor-button-active,.medium-editor-toolbar li button:hover{background-color:#3276b1;color:#fff}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:4px;border-top-left-radius:4px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:4px;border-right:none;border-top-right-radius:4px}.medium-editor-toolbar-form{background:#428bca;border-radius:4px;color:#fff}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#428bca;color:#fff;height:60px}.medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder{color:#fff;color:rgba(255,255,255,.8)}.medium-editor-toolbar-form a{color:#fff}.medium-editor-toolbar-anchor-preview{background:#428bca;border-radius:4px;color:#fff}.medium-editor-placeholder:after{color:#357ebd} -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/default.min.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after{border-color:#242424 transparent transparent;top:50px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #242424;top:-8px}.medium-editor-toolbar{background-color:#242424;background:-webkit-linear-gradient(top,#242424,rgba(36,36,36,.75));background:linear-gradient(to bottom,#242424,rgba(36,36,36,.75));border:1px solid #000;border-radius:5px;box-shadow:0 0 3px #000}.medium-editor-toolbar li button{background-color:#242424;background:-webkit-linear-gradient(top,#242424,rgba(36,36,36,.89));background:linear-gradient(to bottom,#242424,rgba(36,36,36,.89));border:0;border-right:1px solid #000;border-left:1px solid #333;border-left:1px solid rgba(255,255,255,.1);box-shadow:0 2px 2px rgba(0,0,0,.3);color:#fff;height:50px;min-width:50px;-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#000;color:#ff0}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:5px;border-top-left-radius:5px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:5px;border-top-right-radius:5px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#000;background:-webkit-linear-gradient(top,#242424,rgba(0,0,0,.89));background:linear-gradient(to bottom,#242424,rgba(0,0,0,.89));color:#fff}.medium-editor-toolbar-form{background:#242424;border-radius:5px;color:#999}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#242424;box-sizing:border-box;color:#ccc;height:50px}.medium-editor-toolbar-form a{color:#fff}.medium-editor-toolbar-anchor-preview{background:#242424;border-radius:5px;color:#fff}.medium-editor-placeholder:after{color:#b3b3b1} -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/tim.min.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after{border-color:#2f1e07 transparent transparent;top:60px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #2f1e07}.medium-editor-toolbar{background-color:#2f1e07;border:1px solid #5b3a0e;border-radius:6px}.medium-editor-toolbar li button{background-color:transparent;border:none;border-right:1px solid #5b3a0e;box-sizing:border-box;color:#ffedd5;height:60px;min-width:60px;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li .medium-editor-button-active,.medium-editor-toolbar li button:hover{background-color:#030200;color:#ffedd5}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:6px;border-top-left-radius:6px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:6px;border-right:none;border-top-right-radius:6px}.medium-editor-toolbar-form{background:#2f1e07;border-radius:6px;color:#ffedd5}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#2f1e07;color:#ffedd5;height:60px}.medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder{color:#ffedd5;color:rgba(255,237,213,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder{color:#ffedd5;color:rgba(255,237,213,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder{color:#ffedd5;color:rgba(255,237,213,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder{color:#ffedd5;color:rgba(255,237,213,.8)}.medium-editor-toolbar-form a{color:#ffedd5}.medium-editor-toolbar-anchor-preview{background:#2f1e07;border-radius:6px;color:#ffedd5}.medium-editor-placeholder:after{color:#5b3a0e} -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/beagle.min.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after{border-color:#000 transparent transparent;top:40px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #000}.medium-editor-toolbar{background-color:#000;border:none;border-radius:50px}.medium-editor-toolbar li button{background-color:transparent;border:none;box-sizing:border-box;color:#ccc;height:40px;min-width:40px;padding:5px 12px;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li .medium-editor-button-active,.medium-editor-toolbar li button:hover{background-color:#000;color:#a2d7c7}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:50px;border-top-left-radius:50px;padding-left:24px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:50px;border-right:none;border-top-right-radius:50px;padding-right:24px}.medium-editor-toolbar-form{background:#000;border-radius:50px;color:#ccc;overflow:hidden}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#000;box-sizing:border-box;color:#ccc;height:40px;padding-left:16px;width:220px}.medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form a{color:#ccc;-webkit-transform:translateY(2px);transform:translateY(2px)}.medium-editor-toolbar-form .medium-editor-toolbar-close{margin-right:16px}.medium-editor-toolbar-anchor-preview{background:#000;border-radius:50px;padding:5px 12px}.medium-editor-anchor-preview a{color:#ccc;text-decoration:none} -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | medium editor with autolist extension| demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | Fork me on GitHub 13 | 14 |
15 |
16 |

My father’s family name being Pirrip, and my Christian name Philip, my infant tongue could make of both names nothing longer or more explicit than Pip. So, I called myself Pip, and came to be called Pip.

17 | 18 |
19 |
20 | 21 | 22 | 23 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/flat.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after { 2 | top: 60px; 3 | border-color: #57ad68 transparent transparent transparent; } 4 | 5 | .medium-toolbar-arrow-over:before { 6 | top: -8px; 7 | border-color: transparent transparent #57ad68 transparent; } 8 | 9 | .medium-editor-toolbar { 10 | background-color: #57ad68; } 11 | .medium-editor-toolbar li { 12 | padding: 0; } 13 | .medium-editor-toolbar li button { 14 | min-width: 60px; 15 | height: 60px; 16 | border: none; 17 | border-right: 1px solid #9ccea6; 18 | background-color: transparent; 19 | color: #fff; 20 | -webkit-transition: background-color .2s ease-in, color .2s ease-in; 21 | transition: background-color .2s ease-in, color .2s ease-in; } 22 | .medium-editor-toolbar li button:hover { 23 | background-color: #346a3f; 24 | color: #fff; } 25 | .medium-editor-toolbar li .medium-editor-button-active { 26 | background-color: #23482a; 27 | color: #fff; } 28 | .medium-editor-toolbar li .medium-editor-button-last { 29 | border-right: none; } 30 | 31 | .medium-editor-toolbar-form .medium-editor-toolbar-input { 32 | height: 60px; 33 | background: #57ad68; 34 | color: #fff; } 35 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder { 36 | color: #fff; 37 | color: rgba(255, 255, 255, 0.8); } 38 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder { 39 | /* Firefox 18- */ 40 | color: #fff; 41 | color: rgba(255, 255, 255, 0.8); } 42 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder { 43 | /* Firefox 19+ */ 44 | color: #fff; 45 | color: rgba(255, 255, 255, 0.8); } 46 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder { 47 | color: #fff; 48 | color: rgba(255, 255, 255, 0.8); } 49 | 50 | .medium-editor-toolbar-form a { 51 | color: #fff; } 52 | 53 | .medium-editor-toolbar-anchor-preview { 54 | background: #57ad68; 55 | color: #fff; } 56 | 57 | .medium-editor-placeholder:after { 58 | color: #fff; } 59 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/roman.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after, 2 | .medium-toolbar-arrow-over:before { 3 | display: none; } 4 | 5 | .medium-editor-toolbar { 6 | background-color: #fff; 7 | background-color: rgba(255, 255, 255, 0.95); 8 | border-radius: 5px; 9 | box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); } 10 | .medium-editor-toolbar li button { 11 | min-width: 50px; 12 | height: 50px; 13 | border: none; 14 | border-right: 1px solid #a8a8a8; 15 | background-color: transparent; 16 | color: #889aac; 17 | box-shadow: inset 0 0 3px #f8f8e6; 18 | background: -webkit-linear-gradient(top, #fff, rgba(0, 0, 0, 0.2)); 19 | background: linear-gradient(to bottom, #fff, rgba(0, 0, 0, 0.2)); 20 | text-shadow: 1px 4px 6px #def, 0 0 0 #000, 1px 4px 6px #def; 21 | -webkit-transition: background-color .2s ease-in; 22 | transition: background-color .2s ease-in; } 23 | .medium-editor-toolbar li button:hover { 24 | background-color: #fff; 25 | color: #fff; 26 | color: rgba(0, 0, 0, 0.8); } 27 | .medium-editor-toolbar li .medium-editor-button-first { 28 | border-top-left-radius: 5px; 29 | border-bottom-left-radius: 5px; } 30 | .medium-editor-toolbar li .medium-editor-button-last { 31 | border-top-right-radius: 5px; 32 | border-bottom-right-radius: 5px; } 33 | .medium-editor-toolbar li .medium-editor-button-active { 34 | background-color: #ccc; 35 | color: #000; 36 | color: rgba(0, 0, 0, 0.8); 37 | background: -webkit-linear-gradient(bottom, #fff, rgba(0, 0, 0, 0.1)); 38 | background: linear-gradient(to top, #fff, rgba(0, 0, 0, 0.1)); } 39 | 40 | .medium-editor-toolbar-form { 41 | background: #fff; 42 | color: #999; 43 | border-radius: 5px; } 44 | .medium-editor-toolbar-form .medium-editor-toolbar-input { 45 | margin: 0; 46 | height: 50px; 47 | background: #fff; 48 | color: #a8a8a8; } 49 | .medium-editor-toolbar-form a { 50 | color: #889aac; } 51 | 52 | .medium-editor-toolbar-anchor-preview { 53 | background: #fff; 54 | color: #889aac; 55 | border-radius: 5px; } 56 | 57 | .medium-editor-placeholder:after { 58 | color: #a8a8a8; } 59 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/mani.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after, 2 | .medium-toolbar-arrow-over:before { 3 | display: none; } 4 | 5 | .medium-editor-toolbar { 6 | border: 1px solid #cdd6e0; 7 | background-color: #dee7f0; 8 | background-color: rgba(222, 231, 240, 0.95); 9 | background: -webkit-linear-gradient(bottom, #dee7f0, white); 10 | background: linear-gradient(to top, #dee7f0, white); 11 | border-radius: 2px; 12 | box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); } 13 | .medium-editor-toolbar li button { 14 | min-width: 50px; 15 | height: 50px; 16 | border: none; 17 | border-right: 1px solid #cdd6e0; 18 | background-color: transparent; 19 | color: #40648a; 20 | -webkit-transition: background-color .2s ease-in, color .2s ease-in; 21 | transition: background-color .2s ease-in, color .2s ease-in; } 22 | .medium-editor-toolbar li button:hover { 23 | background-color: #5c90c7; 24 | background-color: rgba(92, 144, 199, 0.45); 25 | color: #fff; } 26 | .medium-editor-toolbar li .medium-editor-button-first { 27 | border-top-left-radius: 2px; 28 | border-bottom-left-radius: 2px; } 29 | .medium-editor-toolbar li .medium-editor-button-last { 30 | border-top-right-radius: 2px; 31 | border-bottom-right-radius: 2px; } 32 | .medium-editor-toolbar li .medium-editor-button-active { 33 | background-color: #5c90c7; 34 | background-color: rgba(92, 144, 199, 0.45); 35 | color: #000; 36 | background: -webkit-linear-gradient(top, #dee7f0, rgba(0, 0, 0, 0.1)); 37 | background: linear-gradient(to bottom, #dee7f0, rgba(0, 0, 0, 0.1)); } 38 | 39 | .medium-editor-toolbar-form { 40 | background: #dee7f0; 41 | color: #999; 42 | border-radius: 2px; } 43 | .medium-editor-toolbar-form .medium-editor-toolbar-input { 44 | height: 50px; 45 | background: #dee7f0; 46 | color: #40648a; 47 | box-sizing: border-box; } 48 | .medium-editor-toolbar-form a { 49 | color: #40648a; } 50 | 51 | .medium-editor-toolbar-anchor-preview { 52 | background: #dee7f0; 53 | color: #40648a; 54 | border-radius: 2px; } 55 | 56 | .medium-editor-placeholder:after { 57 | color: #cdd6e0; } 58 | -------------------------------------------------------------------------------- /example/css/demo.css: -------------------------------------------------------------------------------- 1 | *:focus { 2 | outline: none; 3 | } 4 | 5 | body { 6 | font-family: Helvetica, Arial, sans-serif; 7 | font-size: 22px; 8 | line-height: 30px; 9 | } 10 | 11 | .top-bar { 12 | position: fixed; 13 | top: 0; 14 | left: 0; 15 | width: auto; 16 | z-index: 10; 17 | padding: 10px; 18 | background-color: #000; 19 | background-color: rgba(0, 0, 0, .8); 20 | box-shadow: 0 0 4px #000; 21 | box-sizing: border-box; 22 | color: #ccc; 23 | font-size: 12px; 24 | font-weight: bold; 25 | text-align: center; 26 | text-transform: uppercase; 27 | } 28 | 29 | h1 { 30 | font-size: 60px; 31 | font-weight: bold; 32 | text-align: center; 33 | margin-bottom: 40px; 34 | padding-bottom: 40px; 35 | letter-spacing: -2px; 36 | border-bottom: 1px solid #dbdbdb; 37 | } 38 | 39 | h2 { 40 | font-size: 32px; 41 | line-height: 42px; 42 | } 43 | 44 | h3 { 45 | font-size: 26px; 46 | line-height: 32px; 47 | } 48 | 49 | h4 { 50 | font-size: 24px; 51 | line-height: 28px; 52 | } 53 | 54 | p { 55 | margin-bottom: 40px; 56 | } 57 | 58 | a { 59 | color:black; 60 | } 61 | 62 | a:hover { 63 | color:green; 64 | } 65 | 66 | pre { 67 | font-family: 'Menlo', monospace; 68 | font-size: 15px; 69 | background-color: #f0f0f0; 70 | padding: 15px; 71 | border: 1px solid #ccc; 72 | border-radius: 5px; 73 | color: #666; 74 | } 75 | 76 | 77 | blockquote { 78 | display: block; 79 | padding-left: 20px; 80 | border-left: 6px solid #df0d32; 81 | margin-left: -15px; 82 | padding-left: 15px; 83 | font-style: italic; 84 | color: #555; 85 | } 86 | 87 | #container { 88 | width: 960px; 89 | margin: 30px auto; 90 | } 91 | 92 | .editable, 93 | .secondEditable 94 | { 95 | outline: none; 96 | margin: 0 0 20px 0; 97 | padding: 0 0 20px 0; 98 | border-bottom: 1px solid #dbdbdb; 99 | } 100 | 101 | #columns { 102 | width: 90%; 103 | margin: 30px auto; 104 | } 105 | 106 | .column-container { 107 | 108 | } 109 | 110 | .column { 111 | vertical-align: top; 112 | display: inline-block; 113 | width: 30%; 114 | margin: 10px 1%; 115 | } 116 | 117 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/default.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after { 2 | border-color: #242424 transparent transparent transparent; 3 | top: 50px; } 4 | 5 | .medium-toolbar-arrow-over:before { 6 | border-color: transparent transparent #242424 transparent; 7 | top: -8px; } 8 | 9 | .medium-editor-toolbar { 10 | background-color: #242424; 11 | background: -webkit-linear-gradient(top, #242424, rgba(36, 36, 36, 0.75)); 12 | background: linear-gradient(to bottom, #242424, rgba(36, 36, 36, 0.75)); 13 | border: 1px solid #000; 14 | border-radius: 5px; 15 | box-shadow: 0 0 3px #000; } 16 | .medium-editor-toolbar li button { 17 | background-color: #242424; 18 | background: -webkit-linear-gradient(top, #242424, rgba(36, 36, 36, 0.89)); 19 | background: linear-gradient(to bottom, #242424, rgba(36, 36, 36, 0.89)); 20 | border: 0; 21 | border-right: 1px solid #000; 22 | border-left: 1px solid #333; 23 | border-left: 1px solid rgba(255, 255, 255, 0.1); 24 | box-shadow: 0 2px 2px rgba(0, 0, 0, 0.3); 25 | color: #fff; 26 | height: 50px; 27 | min-width: 50px; 28 | -webkit-transition: background-color .2s ease-in; 29 | transition: background-color .2s ease-in; } 30 | .medium-editor-toolbar li button:hover { 31 | background-color: #000; 32 | color: yellow; } 33 | .medium-editor-toolbar li .medium-editor-button-first { 34 | border-bottom-left-radius: 5px; 35 | border-top-left-radius: 5px; } 36 | .medium-editor-toolbar li .medium-editor-button-last { 37 | border-bottom-right-radius: 5px; 38 | border-top-right-radius: 5px; } 39 | .medium-editor-toolbar li .medium-editor-button-active { 40 | background-color: #000; 41 | background: -webkit-linear-gradient(top, #242424, rgba(0, 0, 0, 0.89)); 42 | background: linear-gradient(to bottom, #242424, rgba(0, 0, 0, 0.89)); 43 | color: #fff; } 44 | 45 | .medium-editor-toolbar-form { 46 | background: #242424; 47 | border-radius: 5px; 48 | color: #999; } 49 | .medium-editor-toolbar-form .medium-editor-toolbar-input { 50 | background: #242424; 51 | box-sizing: border-box; 52 | color: #ccc; 53 | height: 50px; } 54 | .medium-editor-toolbar-form a { 55 | color: #fff; } 56 | 57 | .medium-editor-toolbar-anchor-preview { 58 | background: #242424; 59 | border-radius: 5px; 60 | color: #fff; } 61 | 62 | .medium-editor-placeholder:after { 63 | color: #b3b3b1; } 64 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/bootstrap.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after { 2 | border-color: #428bca transparent transparent transparent; 3 | top: 60px; } 4 | 5 | .medium-toolbar-arrow-over:before { 6 | border-color: transparent transparent #428bca transparent; } 7 | 8 | .medium-editor-toolbar { 9 | background-color: #428bca; 10 | border: 1px solid #357ebd; 11 | border-radius: 4px; } 12 | .medium-editor-toolbar li button { 13 | background-color: transparent; 14 | border: none; 15 | border-right: 1px solid #357ebd; 16 | box-sizing: border-box; 17 | color: #fff; 18 | height: 60px; 19 | min-width: 60px; 20 | -webkit-transition: background-color .2s ease-in, color .2s ease-in; 21 | transition: background-color .2s ease-in, color .2s ease-in; } 22 | .medium-editor-toolbar li button:hover { 23 | background-color: #3276b1; 24 | color: #fff; } 25 | .medium-editor-toolbar li .medium-editor-button-first { 26 | border-bottom-left-radius: 4px; 27 | border-top-left-radius: 4px; } 28 | .medium-editor-toolbar li .medium-editor-button-last { 29 | border-bottom-right-radius: 4px; 30 | border-right: none; 31 | border-top-right-radius: 4px; } 32 | .medium-editor-toolbar li .medium-editor-button-active { 33 | background-color: #3276b1; 34 | color: #fff; } 35 | 36 | .medium-editor-toolbar-form { 37 | background: #428bca; 38 | border-radius: 4px; 39 | color: #fff; } 40 | .medium-editor-toolbar-form .medium-editor-toolbar-input { 41 | background: #428bca; 42 | color: #fff; 43 | height: 60px; } 44 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder { 45 | color: #fff; 46 | color: rgba(255, 255, 255, 0.8); } 47 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder { 48 | /* Firefox 18- */ 49 | color: #fff; 50 | color: rgba(255, 255, 255, 0.8); } 51 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder { 52 | /* Firefox 19+ */ 53 | color: #fff; 54 | color: rgba(255, 255, 255, 0.8); } 55 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder { 56 | color: #fff; 57 | color: rgba(255, 255, 255, 0.8); } 58 | .medium-editor-toolbar-form a { 59 | color: #fff; } 60 | 61 | .medium-editor-toolbar-anchor-preview { 62 | background: #428bca; 63 | border-radius: 4px; 64 | color: #fff; } 65 | 66 | .medium-editor-placeholder:after { 67 | color: #357ebd; } 68 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/tim.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after { 2 | border-color: #2f1e07 transparent transparent transparent; 3 | top: 60px; } 4 | 5 | .medium-toolbar-arrow-over:before { 6 | border-color: transparent transparent #2f1e07 transparent; } 7 | 8 | .medium-editor-toolbar { 9 | background-color: #2f1e07; 10 | border: 1px solid #5b3a0e; 11 | border-radius: 6px; } 12 | .medium-editor-toolbar li button { 13 | background-color: transparent; 14 | border: none; 15 | border-right: 1px solid #5b3a0e; 16 | box-sizing: border-box; 17 | color: #ffedd5; 18 | height: 60px; 19 | min-width: 60px; 20 | -webkit-transition: background-color .2s ease-in, color .2s ease-in; 21 | transition: background-color .2s ease-in, color .2s ease-in; } 22 | .medium-editor-toolbar li button:hover { 23 | background-color: #030200; 24 | color: #ffedd5; } 25 | .medium-editor-toolbar li .medium-editor-button-first { 26 | border-bottom-left-radius: 6px; 27 | border-top-left-radius: 6px; } 28 | .medium-editor-toolbar li .medium-editor-button-last { 29 | border-bottom-right-radius: 6px; 30 | border-right: none; 31 | border-top-right-radius: 6px; } 32 | .medium-editor-toolbar li .medium-editor-button-active { 33 | background-color: #030200; 34 | color: #ffedd5; } 35 | 36 | .medium-editor-toolbar-form { 37 | background: #2f1e07; 38 | border-radius: 6px; 39 | color: #ffedd5; } 40 | .medium-editor-toolbar-form .medium-editor-toolbar-input { 41 | background: #2f1e07; 42 | color: #ffedd5; 43 | height: 60px; } 44 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder { 45 | color: #ffedd5; 46 | color: rgba(255, 237, 213, 0.8); } 47 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder { 48 | /* Firefox 18- */ 49 | color: #ffedd5; 50 | color: rgba(255, 237, 213, 0.8); } 51 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder { 52 | /* Firefox 19+ */ 53 | color: #ffedd5; 54 | color: rgba(255, 237, 213, 0.8); } 55 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder { 56 | color: #ffedd5; 57 | color: rgba(255, 237, 213, 0.8); } 58 | .medium-editor-toolbar-form a { 59 | color: #ffedd5; } 60 | 61 | .medium-editor-toolbar-anchor-preview { 62 | background: #2f1e07; 63 | border-radius: 6px; 64 | color: #ffedd5; } 65 | 66 | .medium-editor-placeholder:after { 67 | color: #5b3a0e; } 68 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/themes/beagle.css: -------------------------------------------------------------------------------- 1 | .medium-toolbar-arrow-under:after { 2 | border-color: #000 transparent transparent transparent; 3 | top: 40px; } 4 | 5 | .medium-toolbar-arrow-over:before { 6 | border-color: transparent transparent #000 transparent; } 7 | 8 | .medium-editor-toolbar { 9 | background-color: #000; 10 | border: none; 11 | border-radius: 50px; } 12 | .medium-editor-toolbar li button { 13 | background-color: transparent; 14 | border: none; 15 | box-sizing: border-box; 16 | color: #ccc; 17 | height: 40px; 18 | min-width: 40px; 19 | padding: 5px 12px; 20 | -webkit-transition: background-color .2s ease-in, color .2s ease-in; 21 | transition: background-color .2s ease-in, color .2s ease-in; } 22 | .medium-editor-toolbar li button:hover { 23 | background-color: #000; 24 | color: #a2d7c7; } 25 | .medium-editor-toolbar li .medium-editor-button-first { 26 | border-bottom-left-radius: 50px; 27 | border-top-left-radius: 50px; 28 | padding-left: 24px; } 29 | .medium-editor-toolbar li .medium-editor-button-last { 30 | border-bottom-right-radius: 50px; 31 | border-right: none; 32 | border-top-right-radius: 50px; 33 | padding-right: 24px; } 34 | .medium-editor-toolbar li .medium-editor-button-active { 35 | background-color: #000; 36 | color: #a2d7c7; } 37 | 38 | .medium-editor-toolbar-form { 39 | background: #000; 40 | border-radius: 50px; 41 | color: #ccc; 42 | overflow: hidden; } 43 | .medium-editor-toolbar-form .medium-editor-toolbar-input { 44 | background: #000; 45 | box-sizing: border-box; 46 | color: #ccc; 47 | height: 40px; 48 | padding-left: 16px; 49 | width: 220px; } 50 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder { 51 | color: #f8f5f3; 52 | color: rgba(248, 245, 243, 0.8); } 53 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder { 54 | /* Firefox 18- */ 55 | color: #f8f5f3; 56 | color: rgba(248, 245, 243, 0.8); } 57 | .medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder { 58 | /* Firefox 19+ */ 59 | color: #f8f5f3; 60 | color: rgba(248, 245, 243, 0.8); } 61 | .medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder { 62 | color: #f8f5f3; 63 | color: rgba(248, 245, 243, 0.8); } 64 | .medium-editor-toolbar-form a { 65 | color: #ccc; 66 | -webkit-transform: translateY(2px); 67 | transform: translateY(2px); } 68 | .medium-editor-toolbar-form .medium-editor-toolbar-close { 69 | margin-right: 16px; } 70 | 71 | .medium-editor-toolbar-anchor-preview { 72 | background: #000; 73 | border-radius: 50px; 74 | padding: 5px 12px; } 75 | 76 | .medium-editor-anchor-preview a { 77 | color: #ccc; 78 | text-decoration: none; } 79 | -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/medium-editor.min.css: -------------------------------------------------------------------------------- 1 | .medium-editor-anchor-preview,.medium-editor-toolbar{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;z-index:2000}@-webkit-keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}100%{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}@keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}100%{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}.medium-editor-anchor-preview{left:0;line-height:1.4;max-width:280px;position:absolute;text-align:center;top:0;word-break:break-all;word-wrap:break-word;visibility:hidden}.medium-editor-anchor-preview a{color:#fff;display:inline-block;margin:5px 5px 10px}.medium-editor-anchor-preview-active{visibility:visible}.medium-editor-dragover{background:#ddd}.medium-editor-image-loading{-webkit-animation:medium-editor-image-loading 1s infinite ease-in-out;animation:medium-editor-image-loading 1s infinite ease-in-out;background-color:#333;border-radius:100%;display:inline-block;height:40px;width:40px}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{content:attr(data-placeholder)!important;font-style:italic;left:0;position:absolute;top:0;white-space:pre;padding:inherit;margin:inherit}.medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{border-style:solid;content:'';display:block;height:0;left:50%;margin-left:-8px;position:absolute;width:0}.medium-toolbar-arrow-under:after{border-width:8px 8px 0}.medium-toolbar-arrow-over:before{border-width:0 8px 8px;top:-8px}.medium-editor-toolbar{left:0;position:absolute;top:0;visibility:hidden}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none;margin:0;padding:0}.medium-editor-toolbar li button{box-sizing:border-box;cursor:pointer;display:block;font-size:14px;line-height:1.33;margin:0;padding:15px;text-decoration:none}.medium-editor-toolbar li button:focus{outline:0}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible}.medium-editor-sticky-toolbar{position:fixed;top:1px}.medium-editor-relative-toolbar{position:relative}.medium-editor-toolbar-active.medium-editor-stalker-toolbar{-webkit-animation:medium-editor-pop-upwards 160ms forwards linear;animation:medium-editor-pop-upwards 160ms forwards linear}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form{display:none}.medium-editor-toolbar-form a,.medium-editor-toolbar-form input{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.medium-editor-toolbar-form .medium-editor-toolbar-form-row{line-height:14px;margin-left:5px;padding-bottom:5px}.medium-editor-toolbar-form .medium-editor-toolbar-input,.medium-editor-toolbar-form label{border:none;box-sizing:border-box;font-size:14px;margin:0;padding:6px;width:316px;display:inline-block}.medium-editor-toolbar-form .medium-editor-toolbar-input:focus,.medium-editor-toolbar-form label:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;box-shadow:none;outline:0}.medium-editor-toolbar-form a{display:inline-block;font-size:24px;font-weight:bolder;margin:0 10px;text-decoration:none}.medium-editor-toolbar-actions:after{clear:both;content:"";display:table}[data-medium-editor-element] img{max-width:100%}[data-medium-editor-element] sub{vertical-align:sub}[data-medium-editor-element] sup{vertical-align:super}.medium-editor-hidden{display:none} -------------------------------------------------------------------------------- /bower_components/medium-editor/dist/css/medium-editor.css: -------------------------------------------------------------------------------- 1 | @-webkit-keyframes medium-editor-image-loading { 2 | 0% { 3 | -webkit-transform: scale(0); 4 | transform: scale(0); } 5 | 100% { 6 | -webkit-transform: scale(1); 7 | transform: scale(1); } } 8 | 9 | @keyframes medium-editor-image-loading { 10 | 0% { 11 | -webkit-transform: scale(0); 12 | transform: scale(0); } 13 | 100% { 14 | -webkit-transform: scale(1); 15 | transform: scale(1); } } 16 | 17 | @-webkit-keyframes medium-editor-pop-upwards { 18 | 0% { 19 | opacity: 0; 20 | -webkit-transform: matrix(0.97, 0, 0, 1, 0, 12); 21 | transform: matrix(0.97, 0, 0, 1, 0, 12); } 22 | 20% { 23 | opacity: .7; 24 | -webkit-transform: matrix(0.99, 0, 0, 1, 0, 2); 25 | transform: matrix(0.99, 0, 0, 1, 0, 2); } 26 | 40% { 27 | opacity: 1; 28 | -webkit-transform: matrix(1, 0, 0, 1, 0, -1); 29 | transform: matrix(1, 0, 0, 1, 0, -1); } 30 | 100% { 31 | -webkit-transform: matrix(1, 0, 0, 1, 0, 0); 32 | transform: matrix(1, 0, 0, 1, 0, 0); } } 33 | 34 | @keyframes medium-editor-pop-upwards { 35 | 0% { 36 | opacity: 0; 37 | -webkit-transform: matrix(0.97, 0, 0, 1, 0, 12); 38 | transform: matrix(0.97, 0, 0, 1, 0, 12); } 39 | 20% { 40 | opacity: .7; 41 | -webkit-transform: matrix(0.99, 0, 0, 1, 0, 2); 42 | transform: matrix(0.99, 0, 0, 1, 0, 2); } 43 | 40% { 44 | opacity: 1; 45 | -webkit-transform: matrix(1, 0, 0, 1, 0, -1); 46 | transform: matrix(1, 0, 0, 1, 0, -1); } 47 | 100% { 48 | -webkit-transform: matrix(1, 0, 0, 1, 0, 0); 49 | transform: matrix(1, 0, 0, 1, 0, 0); } } 50 | 51 | .medium-editor-anchor-preview { 52 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 53 | font-size: 16px; 54 | left: 0; 55 | line-height: 1.4; 56 | max-width: 280px; 57 | position: absolute; 58 | text-align: center; 59 | top: 0; 60 | word-break: break-all; 61 | word-wrap: break-word; 62 | visibility: hidden; 63 | z-index: 2000; } 64 | .medium-editor-anchor-preview a { 65 | color: #fff; 66 | display: inline-block; 67 | margin: 5px 5px 10px; } 68 | 69 | .medium-editor-anchor-preview-active { 70 | visibility: visible; } 71 | 72 | .medium-editor-dragover { 73 | background: #ddd; } 74 | 75 | .medium-editor-image-loading { 76 | -webkit-animation: medium-editor-image-loading 1s infinite ease-in-out; 77 | animation: medium-editor-image-loading 1s infinite ease-in-out; 78 | background-color: #333; 79 | border-radius: 100%; 80 | display: inline-block; 81 | height: 40px; 82 | width: 40px; } 83 | 84 | .medium-editor-placeholder { 85 | position: relative; } 86 | .medium-editor-placeholder:after { 87 | content: attr(data-placeholder) !important; 88 | font-style: italic; 89 | left: 0; 90 | position: absolute; 91 | top: 0; 92 | white-space: pre; 93 | padding: inherit; 94 | margin: inherit; } 95 | 96 | .medium-toolbar-arrow-under:after, .medium-toolbar-arrow-over:before { 97 | border-style: solid; 98 | content: ''; 99 | display: block; 100 | height: 0; 101 | left: 50%; 102 | margin-left: -8px; 103 | position: absolute; 104 | width: 0; } 105 | 106 | .medium-toolbar-arrow-under:after { 107 | border-width: 8px 8px 0 8px; } 108 | 109 | .medium-toolbar-arrow-over:before { 110 | border-width: 0 8px 8px 8px; 111 | top: -8px; } 112 | 113 | .medium-editor-toolbar { 114 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 115 | font-size: 16px; 116 | left: 0; 117 | position: absolute; 118 | top: 0; 119 | visibility: hidden; 120 | z-index: 2000; } 121 | .medium-editor-toolbar ul { 122 | margin: 0; 123 | padding: 0; } 124 | .medium-editor-toolbar li { 125 | float: left; 126 | list-style: none; 127 | margin: 0; 128 | padding: 0; } 129 | .medium-editor-toolbar li button { 130 | box-sizing: border-box; 131 | cursor: pointer; 132 | display: block; 133 | font-size: 14px; 134 | line-height: 1.33; 135 | margin: 0; 136 | padding: 15px; 137 | text-decoration: none; } 138 | .medium-editor-toolbar li button:focus { 139 | outline: none; } 140 | .medium-editor-toolbar li .medium-editor-action-underline { 141 | text-decoration: underline; } 142 | .medium-editor-toolbar li .medium-editor-action-pre { 143 | font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; 144 | font-size: 12px; 145 | font-weight: 100; 146 | padding: 15px 0; } 147 | 148 | .medium-editor-toolbar-active { 149 | visibility: visible; } 150 | 151 | .medium-editor-sticky-toolbar { 152 | position: fixed; 153 | top: 1px; } 154 | 155 | .medium-editor-relative-toolbar { 156 | position: relative; } 157 | 158 | .medium-editor-toolbar-active.medium-editor-stalker-toolbar { 159 | -webkit-animation: medium-editor-pop-upwards 160ms forwards linear; 160 | animation: medium-editor-pop-upwards 160ms forwards linear; } 161 | 162 | .medium-editor-action-bold { 163 | font-weight: bolder; } 164 | 165 | .medium-editor-action-italic { 166 | font-style: italic; } 167 | 168 | .medium-editor-toolbar-form { 169 | display: none; } 170 | .medium-editor-toolbar-form input, 171 | .medium-editor-toolbar-form a { 172 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } 173 | .medium-editor-toolbar-form .medium-editor-toolbar-form-row { 174 | line-height: 14px; 175 | margin-left: 5px; 176 | padding-bottom: 5px; } 177 | .medium-editor-toolbar-form .medium-editor-toolbar-input, 178 | .medium-editor-toolbar-form label { 179 | border: none; 180 | box-sizing: border-box; 181 | font-size: 14px; 182 | margin: 0; 183 | padding: 6px; 184 | width: 316px; 185 | display: inline-block; } 186 | .medium-editor-toolbar-form .medium-editor-toolbar-input:focus, 187 | .medium-editor-toolbar-form label:focus { 188 | -webkit-appearance: none; 189 | -moz-appearance: none; 190 | appearance: none; 191 | border: none; 192 | box-shadow: none; 193 | outline: 0; } 194 | .medium-editor-toolbar-form a { 195 | display: inline-block; 196 | font-size: 24px; 197 | font-weight: bolder; 198 | margin: 0 10px; 199 | text-decoration: none; } 200 | 201 | .medium-editor-toolbar-actions:after { 202 | clear: both; 203 | content: ""; 204 | display: table; } 205 | 206 | [data-medium-editor-element] img { 207 | max-width: 100%; } 208 | 209 | [data-medium-editor-element] sub { 210 | vertical-align: sub; } 211 | 212 | [data-medium-editor-element] sup { 213 | vertical-align: super; } 214 | 215 | .medium-editor-hidden { 216 | display: none; } 217 | -------------------------------------------------------------------------------- /bower_components/medium-editor/CUSTOM-EVENTS.md: -------------------------------------------------------------------------------- 1 | # MediumEditor Custom Events (v5.0.0) 2 | 3 | MediumEditor exposes a variety of custom events for convienience when using the editor with your web application. You can attach and detach listeners to these custom events, as well as manually trigger any custom events including your own custom events. 4 | 5 | **NOTE:** 6 | 7 | Custom event listeners are triggered in the order that they were 'subscribed' to. Most functionality within medium-editor uses these custom events to trigger updates, so in general, it can be assumed that most of the built-in functionality has already been completed before any of your custom event listeners will be called. 8 | 9 | If you need to override the editor's bult-in behavior, try overriding the built-in extensions with your own [custom extension](src/js/extensions). 10 | 11 | 12 | 13 | 14 | - [API Methods](#api-methods) 15 | - [`MediumEditor.subscribe(name, listener)`](#mediumeditorsubscribename-listener) 16 | - [`MediumEditor.unsubscribe(name, listener)`](#mediumeditorunsubscribename-listener) 17 | - [`MediumEditor.trigger(name, data, editable)`](#mediumeditortriggername-data-editable) 18 | - [Custom Events](#custom-events) 19 | - [`blur`](#blur) 20 | - [`editableInput`](#editableinput) 21 | - [`externalInteraction`](#externalinteraction) 22 | - [`focus`](#focus) 23 | - [Toolbar Custom Events](#toolbar-custom-events) 24 | - [`hideToolbar`](#hidetoolbar) 25 | - [`positionToolbar`](#positiontoolbar) 26 | - [`showToolbar`](#showtoolbar) 27 | - [Proxied Custom Events](#proxied-custom-events) 28 | - [`editableClick`](#editableclick) 29 | - [`editableBlur`](#editableblur) 30 | - [`editableKeypress`](#editablekeypress) 31 | - [`editableKeyup`](#editablekeyup) 32 | - [`editableKeydown`](#editablekeydown) 33 | - [`editableKeydownEnter`](#editablekeydownenter) 34 | - [`editableKeydownTab`](#editablekeydowntab) 35 | - [`editableKeydownDelete`](#editablekeydowndelete) 36 | - [`editableKeydownSpace`](#editablekeydownspace) 37 | - [`editableMouseover`](#editablemouseover) 38 | - [`editableDrag`](#editabledrag) 39 | - [`editableDrop`](#editabledrop) 40 | - [`editablePaste`](#editablepaste) 41 | 42 | 43 | 44 | ## API Methods 45 | 46 | Use the following methods of [MediumEditor](API.md) for custom event interaction: 47 | 48 | ### `MediumEditor.subscribe(name, listener)` 49 | 50 | Attaches a listener for the specified custom event name. 51 | 52 | **Arguments** 53 | 54 | 1. _**name** (`String`)_: 55 | 56 | * Name of the event to listen to. See the list of built-in [Custom Events](#custom-events) below. 57 | 58 | 2. _**listener(data, editable)** (`function`)_: 59 | 60 | * Listener method that will be called whenever the custom event is triggered. 61 | 62 | **Arguments to listener** 63 | 64 | 1. _**data** (`Event` | `object`)_ 65 | * For most custom events, this will be the browser's native `Event` object for the event that triggered the custom event to fire. 66 | * For some custom events, this will be an object containing information describing the event (depending on which custom event it is) 67 | 2. _**editable** (`HTMLElement`)_ 68 | * A reference to the contenteditable container element that this custom event corresponds to. This is especially useful for instances where one instance of MediumEditor contains multiple elements, or there are multiple instances of MediumEditor on the page. 69 | * For example, when `blur` fires, this argument will be the `
` element that is about to receive focus. 70 | 71 | *** 72 | ### `MediumEditor.unsubscribe(name, listener)` 73 | 74 | Detaches a custom event listener for the specified custom event name. 75 | 76 | **Arguments** 77 | 78 | 1. _**name** (`String`)_: 79 | 80 | * Name of the event to detach the listener for. 81 | 82 | 2. _**listener** (`function`)_: 83 | 84 | * A reference to the listener to detach. This must be a match by-reference and not a copy. 85 | 86 | **NOTE** 87 | 88 | * Calling [destroy()](API.md#destroy) on the MediumEditor object will automatically remove all custom event listeners. 89 | 90 | *** 91 | ### `MediumEditor.trigger(name, data, editable)` 92 | 93 | Manually triggers a custom event. 94 | 95 | 1. _**name** (`String`)_: 96 | 97 | * Name of the custom event to trigger. 98 | 99 | 2. _**data** (`Event` | `object`)_: 100 | 101 | * Native `Event` object or custom data object to pass to all the listeners to this custom event. 102 | 103 | 3. _**editable** (`HTMLElement`)_: 104 | 105 | * The `
` element to pass to all of the listeners to this custom event. 106 | 107 | ## Custom Events 108 | 109 | These events are custom to MediumEditor so there may be one or more native events that can trigger them. 110 | 111 | ### `blur` 112 | 113 | `blur` is triggered whenever a `contenteditable` element within an editor has lost focus to an element other than an editor maintained element (ie Toolbar, Anchor Preview, etc). 114 | 115 | Example: 116 | 117 | 1. User selects text within an editor element, causing the toolbar to appear 118 | 2. User clicks on a toolbar button 119 | * Technically focus may have been lost on the editor element, but since the user is interacting with the toolbar, `blur` is NOT fired. 120 | 3. User hovers over a link, anchor-preview is displayed 121 | 4. User clicks link to edit it, and the toolbar now displays a textbox to edit the url 122 | * Focus will have lost here since focus is now in the url editing textbox, but again since it's within the toolbar, `blur` is NOT fired. 123 | 5. User clicks on another part of the page which hides the toolbar and focus is no longer in the `contenteditable` 124 | 6. `blur` is triggered 125 | 126 | *** 127 | ### `editableInput` 128 | 129 | `editableInput` is triggered whenever the content of a `contenteditable` changes, including keypresses, toolbar actions, or any other user interaction that changes the html within the element. For non-IE browsers, this is just a proxied version of the native `input` event. However, Internet Explorer and has never supported the `input` event on `contenteditable` elements, and Edge has some support for `input` on `contenteditable` (which may be fixed in upcoming release of Edge) so for these browsers the `editableInput` event is triggered through a combination of: 130 | * native `keypress` event on the element 131 | * native `selectionchange` event on the document 132 | * monitoring calls the `document.execCommand()` 133 | 134 | *** 135 | ### `externalInteraction` 136 | 137 | `externalInteraction` is triggered whenever the user interact with any element outside of the `contenteditable` element or the other elements maintained by the editor (ie Toolbar, Anchor Preview, etc.). This event trigger regardless of whether an existing `contenteditable` element had focus or not. 138 | 139 | *** 140 | ### `focus` 141 | 142 | `focus` is triggered whenver a `contenteditable` element within an editor receives focus. If the user interacts with any editor maintained elements (ie toolbar), `blur` is NOT triggered because focus has not been lost. Thus, `focus` will only be triggered when an `contenteditable` element (or the editor that contains it) is first interacted with. 143 | 144 | ## Toolbar Custom Events 145 | 146 | These events are triggered by the toolbar when the toolbar extension has not been disabled. 147 | 148 | ### `hideToolbar` 149 | 150 | `hideToolbar` is triggered whenever the toolbar was visible and has just been hidden. 151 | 152 | ### `positionToolbar` 153 | `positionToolbar` is triggered each time the current selection is checked and the toolbar's position is about to be updated. This event is triggered after all of the buttons have had their state updated, but before the toolbar is moved to the correct location. This event will be triggered even if nothing will be changed about the toolbar's appearance. 154 | 155 | ### `showToolbar` 156 | `showToolbar` is triggered whenever the toolbar was hidden and has just been displayed. 157 | 158 | ## Proxied Custom Events 159 | 160 | These events are triggered whenever a native browser event is triggered for any of the `contenteditable` elements monitored by this instnace of MediumEditor. 161 | 162 | For example, the `editableClick` custom event will be triggered when a native `click` event is fired on any of the `contenteditable` elements. This provides a single event listener that can get fired for all elements, and also allows for the `contenteditable` element that triggered the event to be passed to the listener. 163 | 164 | ##### `editableClick` 165 | native `click` event for each element 166 | ##### `editableBlur` 167 | native `blur` event for each element. 168 | ##### `editableKeypress` 169 | native `keypress` event for each element. 170 | ##### `editableKeyup` 171 | native `keyup` event for each element. 172 | ##### `editableKeydown` 173 | native `keydown` event for each element. 174 | ##### `editableKeydownEnter` 175 | native `keydown` event for each element, but only triggered if the key is `ENTER` (keycode 13). 176 | ##### `editableKeydownTab` 177 | native `keydown` event for each element, but only triggered if the key is `TAB` (keycode 9). 178 | ##### `editableKeydownDelete` 179 | native `keydown` event for each element, but only triggered if the key is `DELETE` (keycode 46). 180 | ##### `editableKeydownSpace` 181 | native `keydown` event for each element, but only triggered if the key is `SPACE` (keycode 32). 182 | ##### `editableMouseover` 183 | native `mouseover` event for each element. 184 | ##### `editableDrag` 185 | native `drag` event for each element. 186 | ##### `editableDrop` 187 | native `drop` event for each element. 188 | ##### `editablePaste` 189 | native `paste` event for each element. 190 | -------------------------------------------------------------------------------- /bower_components/medium-editor/API.md: -------------------------------------------------------------------------------- 1 | # MediumEditor Object API (v5.0.0) 2 | 3 | 4 | 5 | 6 | 7 | - [Initialization Functions](#initialization-functions) 8 | - [`MediumEditor(elements, options)`](#mediumeditorelements-options) 9 | - [`destroy()`](#destroy) 10 | - [`setup()`](#setup) 11 | - [Event Functions](#event-functions) 12 | - [`on(target, event, listener, useCapture)`](#ontarget-event-listener-usecapture) 13 | - [`off(target, event, listener, useCapture)`](#offtarget-event-listener-usecapture) 14 | - [`subscribe(name, listener)`](#subscribename-listener) 15 | - [`unsubscribe(name, listener)`](#unsubscribename-listener) 16 | - [`trigger(name, data, editable)`](#triggername-data-editable) 17 | - [Selection Functions](#selection-functions) 18 | - [`checkSelection()`](#checkselection) 19 | - [`exportSelection()`](#exportselection) 20 | - [`importSelection(selectionState, favorLaterSelectionAnchor)`](#importselectionselectionstate-favorlaterselectionanchor) 21 | - [`getFocusedElement()`](#getfocusedelement) 22 | - [`getSelectedParentElement(range)`](#getselectedparentelementrange) 23 | - [`restoreSelection()`](#restoreselection) 24 | - [`saveSelection()`](#saveselection) 25 | - [`selectAllContents()`](#selectallcontents) 26 | - [`selectElement(element)`](#selectelementelement) 27 | - [`stopSelectionUpdates()`](#stopselectionupdates) 28 | - [`startSelectionUpdates()`](#startselectionupdates) 29 | - [Editor Action Functions](#editor-action-functions) 30 | - [`cleanPaste(text)`](#cleanpastetext) 31 | - [`createLink(opts)`](#createlinkopts) 32 | - [`execAction(action, opts)`](#execactionaction-opts) 33 | - [`pasteHTML(html, options)`](#pastehtmlhtml-options) 34 | - [`queryCommandState(action)`](#querycommandstateaction) 35 | - [Helper Functions](#helper-functions) 36 | - [`delay(fn)`](#delayfn) 37 | - [`getExtensionByName(name)`](#getextensionbynamename) 38 | - [`serialize()`](#serialize) 39 | - [`setContent(html, index)`](#setcontenthtml-index) 40 | 41 | 42 | 43 | ## Initialization Functions 44 | 45 | ### `MediumEditor(elements, options)` 46 | 47 | Creating an instance of MediumEditor will: 48 | * Convert all passed in elements into `contenteditable` elements. 49 | * For any `