Skip to content

Commit

Permalink
Merge pull request #23 from Mindroute/master
Browse files Browse the repository at this point in the history
Upgraded build environment, improved modules and custom button icon
  • Loading branch information
himynameistimli authored Apr 7, 2018
2 parents ab33ef5 + 53fd087 commit 2ff9f4e
Show file tree
Hide file tree
Showing 21 changed files with 11,349 additions and 4,726 deletions.
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.DS_Store
.classpath
.project
.idea/
.vscode/

node_modules
*.log

.DS_Store
package-lock.json
logs/
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

To build __quill-emoji__, run the following command:

```npm run build```
```sh
yarn
yarn build
```

## Testing

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ To add an emoji via emoji code, type ``:`` followed by the first few letters, an
## Installation

```sh
bower install quill-emoji
npm install quill-emoji
yarn add quill-emoji
```

## Usage
Expand Down
24 changes: 0 additions & 24 deletions bower.json

This file was deleted.

124 changes: 51 additions & 73 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,76 +1,54 @@
<html>
<head>
<meta charset="utf-8">
<link href="https://cdn.quilljs.com/1.2.2/quill.snow.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="../dist/quill-emoji.css">
<style type="text/css">
.ap{
font-size: 0px;
}
.emoji{
height:20px;
margin-bottom: -5px;
}
</style>
</head>
<body>

<div class="container" style="position:relative;">
<h2>Editor</h2>
<div id="quill-editor" style="max-height: 300px;"></div>
</div>

<div class="container">
<h2>Debug</h2>
<div style="margin:20px 0px; display:flex;">
<textarea id="output_delta"
style="width:100%; min-height:300px; border: 1px solid lightgray; flex-basis:50%;"></textarea>

<textarea id="output_html"
style="width:100%; min-height:300px; border: 1px solid lightgray; flex-basis:50%;"></textarea>
</div>
</div>
<script src="../node_modules/quill/dist/quill.js"></script>
<script src="../node_modules/fuse.js/src/fuse.js"></script>
<script src="../dist/quill-emoji.js"></script>

<!--<script src="../src/module-textarea-emoji.js"></script>
<script src="../src/emojiList.js"></script>
<script src="../src/module-emoji.js"></script>-->
<script type="text/javascript">
var toolbarOptions = {
container: [
['bold', 'italic', 'underline', 'strike'],
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }],
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'script': 'sub' }, { 'script': 'super' }],
[{ 'indent': '-1' }, { 'indent': '+1' }],
[{ 'direction': 'rtl' }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, { 'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
['clean'],
['emoji'],
['link', 'image', 'video']
],
handlers: {'emoji': function() {}}
}
var quill = new Quill('#quill-editor', {
modules: {
toolbar: toolbarOptions,
//toolbar_emoji: false,
short_name_emoji: true,
textarea_emoji:true
},
placeholder: 'Compose an epic...',
theme: 'snow',
});
var content = '<p><img class="emoji ap ap-yum" src="data:image/png;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="><img class="emoji ap ap-thinking_face" src="data:image/png;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="></p><p></p>';
quill.pasteHTML(content);
setInterval( function() { document.getElementById("output_delta").value=JSON.stringify(quill.editor.getDelta()) }, 500);
setInterval( function() { document.getElementById("output_html").value=quill.root.innerHTML }, 500);
</script>
</body>
<head>
<meta charset="utf-8">
<link href="https://cdn.quilljs.com/1.3.5/quill.snow.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="../dist/quill-emoji.css">
</head>

<body>
<div class="container" style="position:relative;">
<h2>Editor</h2>
<div id="quill-editor" style="max-height: 300px;"></div>
</div>

<script src="https://cdn.quilljs.com/1.3.5/quill.js"></script>
<script src="../dist/quill-emoji.js"></script>

<script type="text/javascript">
var toolbarOptions = {
container: [
['bold', 'italic', 'underline', 'strike'],
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }],
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
[{ 'script': 'sub' }, { 'script': 'super' }],
[{ 'indent': '-1' }, { 'indent': '+1' }],
[{ 'direction': 'rtl' }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, { 'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
['clean'],
['emoji'],
['link', 'image', 'video']
],
handlers: {
'emoji': function () {}
}
}

var quill = new Quill('#quill-editor', {
modules: {
"toolbar": toolbarOptions,
"emoji-toolbar": true,
"emoji-shortname": true,
"emoji-textarea": true
},
placeholder: 'Compose an epic...',
theme: 'snow',
});
</script>
</body>

</html>
Empty file removed dist/.gitkeep
Empty file.
5,541 changes: 5,540 additions & 1 deletion dist/quill-emoji.css

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions dist/quill-emoji.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/quill-emoji.js

Large diffs are not rendered by default.

Loading

0 comments on commit 2ff9f4e

Please sign in to comment.