Skip to content

Commit

Permalink
Merge pull request #137 from mostafaznv/dev
Browse files Browse the repository at this point in the history
feat: add emoji plugin #136
  • Loading branch information
mostafaznv authored Sep 10, 2024
2 parents 0536fb8 + 6c846c5 commit 8a3cc38
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/nova-ckeditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
'|',
'codeBlock',
'blockQuote',
'emoji',
'bulletedList',
'numberedList',
'|',
Expand Down
2 changes: 1 addition & 1 deletion dist/css/field.css

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

2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"webpack": "^5.89.0"
},
"dependencies": {
"@phudak/ckeditor5-emoji": "^1.1.1",
"@vueuse/components": "^10.7.0",
"@vueuse/core": "^10.7.0",
"lodash": "^4.17.21",
Expand Down
13 changes: 12 additions & 1 deletion resources/js/ckeditor/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ import Audio from "./plugins/audio/audio"
import {Clipboard} from '@ckeditor/ckeditor5-clipboard'
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting'
import ElementAddAttributes from './plugins/element-attribute/src/add-attribute-to-element'
import {Emoji, EmojiActivity, EmojiFlags, EmojiFood, EmojiNature, EmojiObjects, EmojiPeople, EmojiPlaces, EmojiSymbols} from '@phudak/ckeditor5-emoji/src';


// Extend the Base Class
export default class CkEditor extends ClassicEditorBase {
Expand Down Expand Up @@ -141,7 +143,16 @@ export default class CkEditor extends ClassicEditorBase {
IndentBlock,
ElementAddAttributes,
Clipboard,
SimpleUploadAdapter
SimpleUploadAdapter,
Emoji,
EmojiPeople,
EmojiNature,
EmojiPlaces,
EmojiFood,
EmojiActivity,
EmojiObjects,
EmojiSymbols,
EmojiFlags,
]
}
}
9 changes: 9 additions & 0 deletions resources/sass/field.sass
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ input
opacity: 0.5
cursor: not-allowed


// emojis
.ck-character-grid__tiles
display: grid
grid-template-columns: repeat(10, 1fr)
height: 200px!important
overflow-y: auto


@media (max-width: 800px)
.nova-ckeditor-mobile-none
display: none !important

0 comments on commit 8a3cc38

Please sign in to comment.