fix(fluent-editor): fix emoji module (#1891)

This commit is contained in:
Kagol 2024-08-12 15:37:56 +08:00 committed by GitHub
parent e519280059
commit 71b0cb9d49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 13 deletions

View File

@ -38,6 +38,7 @@ onMounted(() => {
toolbar: {
container: TOOLBAR_CONFIG
},
'emoji-toolbar': true
mention: {
itemKey: 'cn',
searchKey,

View File

@ -456,7 +456,6 @@
}
}
:host ::ng-deep,
.emoji {
@include emoji;
}

View File

@ -1,10 +1,6 @@
@import '../common.scss';
:host ::ng-deep {
#quill-editor {
position: relative;
}
.ql-container {
.mention {
color: #5e7ce0;
}
@ -119,7 +115,7 @@
#emoji-palette {
position: fixed;
max-width: 250px;
max-width: 231px;
z-index: 999;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
border-radius: 1px;
@ -128,7 +124,7 @@
.bem {
font-size: 24px;
width: 34px;
width: 20px;
display: inline-block;
text-align: center;
cursor: pointer;
@ -245,7 +241,7 @@
}
}
::ng-deep #emoji-close-div {
#emoji-close-div {
width: 100vw;
height: 100vh;
position: fixed;

View File

@ -5,7 +5,7 @@ import CustomClipboard from './custom-clipboard' // 粘贴板
import CustomImage from './custom-image/BlotFormatter' // 图片
import { CustomImageSpec } from './custom-image/specs/CustomImageSpec' // 图片拉伸模块
import CustomUploader from './custom-uploader' // 上传
// import Emoji from './emoji' // 表情
import Emoji from './emoji' // 表情
import FileModule from './file' // 文件
// import GlobalLink from './global-link' // 全局链接
import LineHeightStyle from './lineheight'
@ -57,6 +57,7 @@ const registerModules = function () {
const accept = this.quill.options?.uploadOption?.imageAccept
inputFile.call(this, 'image', accept)
},
emoji: function() {},
fullscreen: function() {},
list: function (value) {
const range = this.quill.getSelection();
@ -134,9 +135,9 @@ const registerModules = function () {
'formats/softBreak': SoftBreak,
'formats/lineheight': LineHeightStyle,
'formats/video': Video,
// 'formats/emoji': Emoji.EmojiBlot, 表情包模块暂不开发
// 'modules/emoji-toolbar': Emoji.ToolbarEmoji,
// 'modules/emoji-shortname': Emoji.ShortNameEmoji,
'formats/emoji': Emoji.EmojiBlot,
'modules/emoji-toolbar': Emoji.ToolbarEmoji,
'modules/emoji-shortname': Emoji.ShortNameEmoji,
// 'modules/global-link': GlobalLink,//暂未开发
'modules/link': Link, // 报错
// 'modules/screenshot': Screenshot,//暂未开发