Skip to content

Commit ff38222

Browse files
[UXP-241] add emoji plugin
1 parent 665b804 commit ff38222

3 files changed

Lines changed: 19 additions & 12 deletions

File tree

angular.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"./node_modules/quill/dist/quill.core.css",
7474
"./node_modules/quill/dist/quill.snow.css",
7575
"./node_modules/quill/dist/quill.bubble.css",
76+
"./node_modules/quill-emoji/dist/quill-emoji.css"
7677
],
7778
"scripts": [],
7879
"baseHref": "/"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
"ngx-quill": "21.0.2",
153153
"prop-types": "^15.8.1",
154154
"quill": "1.3.7",
155+
"quill-emoji": "^0.2.0",
155156
"react-copy-to-clipboard": "^5.1.0",
156157
"reflect-metadata": "^0.2.2",
157158
"rxjs": "^7.8.0",

src/app/shared/markdown-editor/markdown-editor.component.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'quill-emoji/dist/quill-emoji.js';
12
import { Component, EventEmitter, Input, Output } from '@angular/core';
23
import { ContentChange, QuillModules } from 'ngx-quill';
34

@@ -20,18 +21,22 @@ export class MarkdownEditorComponent {
2021
* Quill modules config
2122
*/
2223
modules: QuillModules = {
23-
toolbar: [
24-
['bold', 'italic', 'underline', 'strike'],
25-
[{ 'header': 1 }, { 'header': 2 }],
26-
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
27-
[{ 'indent': '-1'}, { 'indent': '+1' }],
28-
[{ 'direction': 'rtl' }],
29-
[{ 'size': ['small', false, 'large', 'huge'] }],
30-
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
31-
[{ 'font': [] }],
32-
[{ 'align': [] }],
33-
['clean'],
34-
],
24+
'emoji-toolbar': true,
25+
toolbar: {
26+
container: [
27+
['bold', 'italic', 'underline', 'strike'],
28+
[{ 'header': 1 }, { 'header': 2 }],
29+
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
30+
[{ 'indent': '-1'}, { 'indent': '+1' }],
31+
[{ 'direction': 'rtl' }],
32+
[{ 'size': ['small', false, 'large', 'huge'] }],
33+
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
34+
[{ 'font': [] }],
35+
[{ 'align': [] }],
36+
['clean'],
37+
['emoji'],
38+
],
39+
},
3540
syntax: false
3641
};
3742

0 commit comments

Comments
 (0)