Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add emoji plugin #136 #137

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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