+
`;
diff --git a/ts_web/elements/wysiwyg/dees-formatting-menu.ts b/ts_web/elements/wysiwyg/dees-formatting-menu.ts
index fda6170..dea2918 100644
--- a/ts_web/elements/wysiwyg/dees-formatting-menu.ts
+++ b/ts_web/elements/wysiwyg/dees-formatting-menu.ts
@@ -7,7 +7,7 @@ import {
css,
state,
} from '@design.estate/dees-element';
-import { zIndexLayers } from '../00zindex.js';
+import { zIndexRegistry } from '../00zindex.js';
import { WysiwygFormatting } from './wysiwyg.formatting.js';
@@ -35,6 +35,9 @@ export class DeesFormattingMenu extends DeesElement {
@state()
private position: { x: number; y: number } = { x: 0, y: 0 };
+ @state()
+ private menuZIndex: number = 1000;
+
private callback: ((command: string) => void | Promise
) | null = null;
public static styles = [
@@ -42,7 +45,6 @@ export class DeesFormattingMenu extends DeesElement {
css`
:host {
position: fixed;
- z-index: ${zIndexLayers.wysiwygMenus};
pointer-events: none;
}
@@ -119,6 +121,9 @@ export class DeesFormattingMenu extends DeesElement {
render(): TemplateResult {
if (!this.visible) return html``;
+ // Apply z-index to host element
+ this.style.zIndex = this.menuZIndex.toString();
+
return html`
- Context Menus & WYSIWYG
- z-index: 4000-4500
+ Context Menus
+ z-index: 4000
Toast Notifications
@@ -650,6 +651,40 @@ export const showcasePage = () => html`
}}>Show Multiple Toasts
+
+
Modal with WYSIWYG Editor
+
{
+ await DeesModal.createAndShow({
+ heading: 'WYSIWYG Editor Test',
+ width: 'large',
+ content: html`
+ Test the WYSIWYG editor slash commands and formatting menus in a modal:
+
+
+
+
+ Tips:
+ • Type "/" to open the slash command menu
+ • Select text to see the formatting toolbar
+ • Both menus should appear above this modal
+
+ `,
+ menuOptions: [
+ { name: 'Cancel', action: async (modal) => modal.destroy() },
+ { name: 'Save', action: async (modal) => {
+ DeesToast.createAndShow({ message: 'Document saved!', type: 'success' });
+ modal.destroy();
+ }}
+ ]
+ });
+ }}>Test WYSIWYG in Modal
+
+
Modal with Tags Input
{
@@ -739,6 +774,7 @@ export const showcasePage = () => html`
Unregister on cleanup: zIndexRegistry.unregister(element)
Elements created later automatically appear on top
Test overlay interactions, especially dropdowns in modals
+ WYSIWYG menus (slash commands, formatting) now use dynamic z-index
Import Example: