Ngx-Emoji-Picker
This project was forked from the ionic3-emoji-picker project created by danielehrhardt
What's New
- Fixed the AOT (Ahead Of Time) Compile error or simply put the ---prod build compile error.
- Upgraded the library from a Ng2 project to a Ng7 project.
- Upgraded the library RxJs from v5 to v6 to make it support new angular versions.
- Now compatible with Ng2 - Ng7 projects and as well as Ionic 3/4.
Installation
Install the module via NPM
npm i ngx-emoji-picker --save
Import it in your app's module(s)
Import EmojiPickerModule.forRoot()
in your app's main module
app.module.ts
;
If your app uses lazy loading, you need to import EmojiPickerModule
in your shared module or child modules:
;
Sample
Angular Example
😄
toggled: boolean = false;handleSelectionevent
Ionic 3 Example
toggled: boolean = false;message: string; handleSelectionevent
Directive API:
(emojiPickerSelect)="handleSelection($event)"
Emitter $event = EmojiEvent{ char : "😌", label : "relieved" }
EmojiPickerCaretEmitter
added for your convenience, emits information regarding a contenteditable enabled element
(emojiPickerCaretEmitter)="handleCaretChange($event)"
Emitter $event = CaretEvent{ caretOffset: 13, caretRange: Range{...}, textContent: 'content of div or input' }
Emoji Picker will get placed relative the element chosen via the directive api, centered and within window borders