Skip to content

Commit 29ea45d

Browse files
author
marker dao ®
committed
feat(toolbar && menu): Hide before element in Submenu in Generic
1 parent a49ea3e commit 29ea45d

File tree

2 files changed

+11
-1
lines changed
  • packages
    • devextreme-scss/scss/widgets/generic/htmlEditor
    • devextreme/js/__internal/ui/html_editor/modules

2 files changed

+11
-1
lines changed

packages/devextreme-scss/scss/widgets/generic/htmlEditor/_index.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@
211211
border-top-color: $htmleditor-toolbar-border-color;
212212
}
213213

214+
.dx-htmleditor-toolbar-ai-overlay-content {
215+
.dx-context-menu-content-delimiter::before {
216+
content: none;
217+
}
218+
}
219+
214220
.dx-resize-frame {
215221
border-color: $htmleditor-resize-frame-border-color;
216222

packages/devextreme/js/__internal/ui/html_editor/modules/m_toolbar.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
isDefined, isEmptyObject, isObject, isString,
1616
} from '@js/core/utils/type';
1717
import type { AICommandName, AICustomCommand, AIToolbarItem } from '@js/ui/html_editor';
18-
import type { ContentReadyEvent, ItemClickEvent } from '@js/ui/menu';
18+
import type { ContentReadyEvent, ItemClickEvent, SubmenuShownEvent } from '@js/ui/menu';
1919
import type { Item } from '@js/ui/toolbar';
2020
import Toolbar from '@js/ui/toolbar';
2121
import errors from '@js/ui/widget/ui.errors';
@@ -45,6 +45,7 @@ if (Quill) {
4545
const TOOLBAR_FORMAT_WIDGET_CLASS = 'dx-htmleditor-toolbar-format';
4646
const TOOLBAR_SEPARATOR_CLASS = 'dx-htmleditor-toolbar-separator';
4747
const TOOLBAR_MENU_SEPARATOR_CLASS = 'dx-htmleditor-toolbar-menu-separator';
48+
const TOOLBAR_AI_OVERLAY_CONTENT_CLASS = 'dx-htmleditor-toolbar-ai-overlay-content';
4849
const ACTIVE_FORMAT_CLASS = 'dx-format-active';
4950
const SELECTED_STATE_CLASS = 'dx-state-selected';
5051

@@ -484,6 +485,9 @@ if (Quill) {
484485
const options = {
485486
dataSource,
486487
disabled: isMenuDisabled,
488+
onSubmenuShown: ({ submenuContainer }: SubmenuShownEvent): void => {
489+
$(submenuContainer).parent().addClass(TOOLBAR_AI_OVERLAY_CONTENT_CLASS);
490+
},
487491
onContentReady: (e: ContentReadyEvent): void => {
488492
const $item = $(e.element).find(`.${DX_MENU_ITEM_CLASS}`).first();
489493
$item.attr('aria-label', localizationMessage.format('dxHtmlEditor-aiToolbarItemAriaLabel'));

0 commit comments

Comments
 (0)