fix: Editor menu option is not showing (#7879)

This commit is contained in:
Sivin Varghese
2023-09-07 17:15:19 +05:30
committed by GitHub
parent 57a68666cb
commit 3038aaef67
2 changed files with 8 additions and 5 deletions

View File

@@ -51,6 +51,7 @@ import uiSettingsMixin from 'dashboard/mixins/uiSettings';
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
import { replaceVariablesInMessage } from '@chatwoot/utils';
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
import { MESSAGE_EDITOR_MENU_OPTIONS } from 'dashboard/constants/editor';
const createState = (
content,
@@ -111,6 +112,11 @@ export default {
this.enableCannedResponses && this.showCannedMenu && !this.isPrivate
);
},
editorMenuOptions() {
return this.enabledMenuOptions.length
? this.enabledMenuOptions
: MESSAGE_EDITOR_MENU_OPTIONS;
},
plugins() {
if (!this.enableSuggestions) {
return [];
@@ -249,7 +255,7 @@ export default {
this.value,
this.placeholder,
this.plugins,
this.enabledMenuOptions
this.editorMenuOptions
);
},
mounted() {
@@ -263,7 +269,7 @@ export default {
content,
this.placeholder,
this.plugins,
this.enabledMenuOptions
this.editorMenuOptions
);
this.editorView.updateState(this.state);
this.focusEditorInputField();

View File

@@ -69,7 +69,6 @@
:min-height="4"
:enable-variables="true"
:variables="messageVariables"
:enabled-menu-options="customEditorMenuOptions"
@typing-off="onTypingOff"
@typing-on="onTypingOn"
@focus="onFocus"
@@ -185,7 +184,6 @@ import wootConstants from 'dashboard/constants/globals';
import { isEditorHotKeyEnabled } from 'dashboard/mixins/uiSettings';
import { CONVERSATION_EVENTS } from '../../../helper/AnalyticsHelper/events';
import rtlMixin from 'shared/mixins/rtlMixin';
import { MESSAGE_EDITOR_MENU_OPTIONS } from 'dashboard/constants/editor';
const EmojiInput = () => import('shared/components/emoji/EmojiInput');
@@ -228,7 +226,6 @@ export default {
data() {
return {
message: '',
customEditorMenuOptions: MESSAGE_EDITOR_MENU_OPTIONS,
isFocused: false,
showEmojiPicker: false,
attachedFiles: [],