Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <textarea matInput #newMessage color="primary"
- mwlTextInputElement
- [formControl]="newMessageFormControl"
- [value]="newMessageFormControl.value | q9Emoji"
- ></textarea>`
- TS:
- transform(value: any): any {
- return this.replace(value);
- }
- replace(value) {
- const emojisRegex = new RegExp(':(' +
- Object.keys(this.emojiObj).join('|') + '):', 'g');
- return value.replace(emojisRegex, (match, text) => this.emojiService.unifiedToNative(this.emojiObj[text]));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement