Skip to content

Commit

Permalink
onKeyUp: detect emoji after colon when using div::contenteditable
Browse files Browse the repository at this point in the history
onKeyUp demo: detect emoji after colon when using div::contenteditable

onKeyup div contentEditable: replace emoji & restore cursor position

onKeyup div contentEditable: unchange wdt-emoji-bundle.min.js
  • Loading branch information
Viet committed May 15, 2018
1 parent c97f0ff commit 1354e33
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h4 class="text-center">Slack like emoji picker with <br> <strong>apple</strong>
<hr>
<div class="form-group">
<label>div::contenteditable</label>
<div id="contenteditable" class="form-control wdt-emoji-bundle-enabled" contentEditable="true">;) <strong>Hey!</strong> check :heart_eyes: this. :dog: :cat: :hamster:</div>
<div id="contenteditable" class="form-control wdt-emoji-bundle-enabled wdt-emoji-open-on-colon" contentEditable="true">;) Hey! check :heart_eyes: this. :dog: :cat: :hamster:</div>
</div>
<div class="form-group">
<label class="label-block">&downarrow;</label>
Expand Down
21 changes: 17 additions & 4 deletions wdt-emoji-bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1354e33

Please sign in to comment.