mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 12:37:56 +00:00
fix: Editor menu option is not showing (#7879)
This commit is contained in:
@@ -51,6 +51,7 @@ import uiSettingsMixin from 'dashboard/mixins/uiSettings';
|
|||||||
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
|
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
|
||||||
import { replaceVariablesInMessage } from '@chatwoot/utils';
|
import { replaceVariablesInMessage } from '@chatwoot/utils';
|
||||||
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
||||||
|
import { MESSAGE_EDITOR_MENU_OPTIONS } from 'dashboard/constants/editor';
|
||||||
|
|
||||||
const createState = (
|
const createState = (
|
||||||
content,
|
content,
|
||||||
@@ -111,6 +112,11 @@ export default {
|
|||||||
this.enableCannedResponses && this.showCannedMenu && !this.isPrivate
|
this.enableCannedResponses && this.showCannedMenu && !this.isPrivate
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
editorMenuOptions() {
|
||||||
|
return this.enabledMenuOptions.length
|
||||||
|
? this.enabledMenuOptions
|
||||||
|
: MESSAGE_EDITOR_MENU_OPTIONS;
|
||||||
|
},
|
||||||
plugins() {
|
plugins() {
|
||||||
if (!this.enableSuggestions) {
|
if (!this.enableSuggestions) {
|
||||||
return [];
|
return [];
|
||||||
@@ -249,7 +255,7 @@ export default {
|
|||||||
this.value,
|
this.value,
|
||||||
this.placeholder,
|
this.placeholder,
|
||||||
this.plugins,
|
this.plugins,
|
||||||
this.enabledMenuOptions
|
this.editorMenuOptions
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -263,7 +269,7 @@ export default {
|
|||||||
content,
|
content,
|
||||||
this.placeholder,
|
this.placeholder,
|
||||||
this.plugins,
|
this.plugins,
|
||||||
this.enabledMenuOptions
|
this.editorMenuOptions
|
||||||
);
|
);
|
||||||
this.editorView.updateState(this.state);
|
this.editorView.updateState(this.state);
|
||||||
this.focusEditorInputField();
|
this.focusEditorInputField();
|
||||||
|
|||||||
@@ -69,7 +69,6 @@
|
|||||||
:min-height="4"
|
:min-height="4"
|
||||||
:enable-variables="true"
|
:enable-variables="true"
|
||||||
:variables="messageVariables"
|
:variables="messageVariables"
|
||||||
:enabled-menu-options="customEditorMenuOptions"
|
|
||||||
@typing-off="onTypingOff"
|
@typing-off="onTypingOff"
|
||||||
@typing-on="onTypingOn"
|
@typing-on="onTypingOn"
|
||||||
@focus="onFocus"
|
@focus="onFocus"
|
||||||
@@ -185,7 +184,6 @@ import wootConstants from 'dashboard/constants/globals';
|
|||||||
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
|
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
|
||||||
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
|
||||||
import rtlMixin from 'shared/mixins/rtlMixin';
|
import rtlMixin from 'shared/mixins/rtlMixin';
|
||||||
import { MESSAGE_EDITOR_MENU_OPTIONS } from 'dashboard/constants/editor';
|
|
||||||
|
|
||||||
const EmojiInput = () => import('shared/components/emoji/EmojiInput');
|
const EmojiInput = () => import('shared/components/emoji/EmojiInput');
|
||||||
|
|
||||||
@@ -228,7 +226,6 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
message: '',
|
message: '',
|
||||||
customEditorMenuOptions: MESSAGE_EDITOR_MENU_OPTIONS,
|
|
||||||
isFocused: false,
|
isFocused: false,
|
||||||
showEmojiPicker: false,
|
showEmojiPicker: false,
|
||||||
attachedFiles: [],
|
attachedFiles: [],
|
||||||
|
|||||||
Reference in New Issue
Block a user