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();