diff --git a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue index 70ef74024..cd275e051 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue @@ -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(); diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue index 38f80d59b..470da3cc5 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue @@ -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: [],