feat: Complete markdown syntax refinement and variable protection

 New cleaner syntax implemented:
- [card:type] instead of [card type='type']
- [button:style](url)Text[/button] instead of [button url='...' style='...']
- Standard markdown images: ![alt](url)

 Variable protection from markdown parsing:
- Variables with underscores (e.g., {order_items_table}) now protected
- HTML comment placeholders prevent italic/bold parsing
- All variables render correctly in preview

 Button rendering fixes:
- Buttons work in Visual mode inside cards
- Buttons work in Preview mode
- Button clicks prevented in visual editor
- Proper styling for solid and outline buttons

 Backward compatibility:
- Old syntax still supported
- No breaking changes

 Bug fixes:
- Fixed order_item_table → order_items_table naming
- Fixed button regex to match across newlines
- Added button/image parsing to parseMarkdownBasics
- Prevented button clicks on .button and .button-outline classes

📚 Documentation:
- NEW_MARKDOWN_SYNTAX.md - Complete user guide
- MARKDOWN_SYNTAX_AND_VARIABLES.md - Technical analysis
This commit is contained in:
dwindown
2025-11-15 20:05:50 +07:00
parent 550b3b69ef
commit 4471cd600f
45 changed files with 9194 additions and 508 deletions

View File

@@ -168,4 +168,25 @@ body.woonoow-fullscreen .woonoow-app { overflow: visible; }
html #wpadminbar {
position: fixed;
top: 0;
}
/* WordPress Media Modal z-index fix */
/* Ensure WP media modal appears above Radix UI components (Dialog, Select, etc.) */
.media-modal {
z-index: 999999 !important;
pointer-events: auto !important;
}
/* Ensure media modal content is above the backdrop and receives clicks */
.media-modal-content {
z-index: 1000000 !important;
pointer-events: auto !important;
}
/* Ensure all interactive elements in WP media can receive clicks */
.media-modal .media-frame,
.media-modal .media-toolbar,
.media-modal .attachments,
.media-modal .attachment {
pointer-events: auto !important;
}