dwindown
1211430011
feat: Code Mode Button Position & Markdown Support! 📝
## ✅ 3. Code Mode Button Moved to Left
**Problem:** Inconsistent layout, tabs on right should be Editor/Preview only
**Solution:**
- Moved Code Mode button next to "Message Body" label
- Editor/Preview tabs stay on the right
- Consistent, logical layout
**Before:**
```
Message Body [Editor|Preview] [Code Mode]
```
**After:**
```
Message Body [Code Mode] [Editor|Preview]
```
## ✅ 4. Markdown Support in Code Mode! 🎉
**Problem:** HTML is verbose, not user-friendly for tech-savvy users
**Solution:**
- Added Markdown parser with ::: syntax for cards
- Toggle between HTML and Markdown modes
- Full bidirectional conversion
**Markdown Syntax:**
```markdown
:::card
# Heading
Your content here
:::
:::card[success]
✅ Success message
:::
[button](https://example.com){Click Here}
[button style="outline"](url){Secondary Button}
```
**Features:**
- Standard Markdown: headings, bold, italic, lists, links
- Card blocks: :::card or :::card[type]
- Button blocks: [button](url){text}
- Variables: {order_url}, {customer_name}
- Bidirectional conversion (HTML ↔ Markdown)
**Files:**
- `lib/markdown-parser.ts` - Parser implementation
- `components/ui/code-editor.tsx` - Mode toggle
- `routes/Settings/Notifications/EditTemplate.tsx` - Enable support
- `DEPENDENCIES.md` - Add @codemirror/lang-markdown
**Note:** Requires `npm install @codemirror/lang-markdown`
Ready for remaining improvements (5-6)!
2025-11-13 11:50:38 +07:00
..
2025-11-04 11:19:00 +07:00
2025-11-13 11:50:38 +07:00
2025-11-05 18:54:41 +07:00
2025-11-13 10:13:17 +07:00
2025-11-04 11:19:00 +07:00
2025-11-13 11:50:38 +07:00
2025-11-13 09:50:33 +07:00
2025-11-13 08:03:35 +07:00
2025-11-13 08:03:35 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-04 11:19:00 +07:00
2025-11-13 10:34:07 +07:00
2025-11-04 11:19:00 +07:00