docs: Comprehensive Documentation for All Improvements! 📚
Added detailed documentation:
1. EMAIL_BUILDER_IMPROVEMENTS.md
- Complete feature descriptions
- Implementation details
- User experience improvements
- Testing checklist
- WordPress integration details
2. Updated DEPENDENCIES.md
- Quick install command
- Individual package descriptions
- What's new section
- Verification checklist
- WordPress integration notes
All improvements documented and ready for production! 🎉
This commit is contained in:
@@ -1,58 +1,105 @@
|
||||
# Required Dependencies for Email Builder
|
||||
|
||||
## Install These Packages:
|
||||
## 🚀 Quick Install (Recommended)
|
||||
|
||||
Install all dependencies at once:
|
||||
|
||||
```bash
|
||||
cd admin-spa
|
||||
npm install @tiptap/extension-text-align @tiptap/extension-image codemirror @codemirror/lang-html @codemirror/theme-one-dark @radix-ui/react-radio-group
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📦 Individual Packages
|
||||
|
||||
### TipTap Extensions (for RichTextEditor)
|
||||
```bash
|
||||
npm install @tiptap/extension-text-align @tiptap/extension-image
|
||||
```
|
||||
|
||||
**What they do:**
|
||||
- **@tiptap/extension-text-align**: Text alignment (left, center, right)
|
||||
- **@tiptap/extension-image**: Image insertion with WordPress Media Modal
|
||||
|
||||
### CodeMirror (for Code Mode)
|
||||
```bash
|
||||
npm install codemirror @codemirror/lang-html @codemirror/theme-one-dark
|
||||
```
|
||||
|
||||
**What they do:**
|
||||
- **codemirror**: Core editor with professional features
|
||||
- **@codemirror/lang-html**: HTML syntax highlighting & auto-completion
|
||||
- **@codemirror/theme-one-dark**: Professional dark theme
|
||||
|
||||
### Radix UI (for UI Components)
|
||||
```bash
|
||||
npm install @radix-ui/react-radio-group
|
||||
```
|
||||
|
||||
## Or Install All at Once:
|
||||
```bash
|
||||
npm install @tiptap/extension-text-align @tiptap/extension-image codemirror @codemirror/lang-html @codemirror/theme-one-dark @radix-ui/react-radio-group
|
||||
```
|
||||
**What it does:**
|
||||
- **@radix-ui/react-radio-group**: Radio button component for button style selection
|
||||
|
||||
## What Each Package Does:
|
||||
---
|
||||
|
||||
### @tiptap/extension-text-align
|
||||
- Adds text alignment support (left, center, right)
|
||||
- Used in RichTextEditor toolbar
|
||||
## ✅ After Installation
|
||||
|
||||
### @tiptap/extension-image
|
||||
- Adds image insertion support
|
||||
- Allows users to add images via URL
|
||||
|
||||
### codemirror
|
||||
- Core CodeMirror editor
|
||||
- Professional code editing experience
|
||||
|
||||
### @codemirror/lang-html
|
||||
- HTML syntax highlighting
|
||||
- Auto-completion for HTML tags
|
||||
|
||||
### @codemirror/theme-one-dark
|
||||
- One Dark color theme
|
||||
- Professional dark theme for code editor
|
||||
|
||||
### @radix-ui/react-radio-group
|
||||
- Radio button component
|
||||
- Used in button style selection dialog
|
||||
|
||||
## After Installation:
|
||||
|
||||
Run the development server:
|
||||
### Start Development Server
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
All features will work correctly!
|
||||
### Verify Installation
|
||||
All these features should work:
|
||||
- ✅ Heading selector in RichTextEditor
|
||||
- ✅ Text alignment buttons
|
||||
- ✅ Image insertion via WordPress Media
|
||||
- ✅ Styled buttons in cards
|
||||
- ✅ Code mode with syntax highlighting
|
||||
- ✅ Button style selection dialog
|
||||
|
||||
---
|
||||
|
||||
## 🎯 What's New
|
||||
|
||||
### All 5 User-Requested Improvements:
|
||||
|
||||
1. **Heading Selector** - H1-H4 and Paragraph dropdown
|
||||
2. **Styled Buttons in Cards** - Custom TipTap extension
|
||||
3. **Variable Pills** - Click to insert variables
|
||||
4. **WordPress Media for Images** - Native WP Media Modal
|
||||
5. **WordPress Media for Logos** - Store settings integration
|
||||
|
||||
### New Files Created:
|
||||
- `lib/wp-media.ts` - WordPress Media Modal helper
|
||||
- `components/ui/tiptap-button-extension.ts` - Custom button node
|
||||
- `components/ui/code-editor.tsx` - CodeMirror wrapper
|
||||
|
||||
### Files Modified:
|
||||
- `components/ui/rich-text-editor.tsx` - Added heading selector, alignment, buttons, WP Media
|
||||
- `components/ui/image-upload.tsx` - Added WP Media Modal option
|
||||
- `components/EmailBuilder/EmailBuilder.tsx` - Added variable pills
|
||||
- `routes/Settings/Store.tsx` - Added mediaType props
|
||||
|
||||
---
|
||||
|
||||
## 📚 Documentation
|
||||
|
||||
See `EMAIL_BUILDER_IMPROVEMENTS.md` for:
|
||||
- Detailed feature descriptions
|
||||
- Implementation details
|
||||
- User experience improvements
|
||||
- Testing checklist
|
||||
- Complete feature list
|
||||
|
||||
---
|
||||
|
||||
## 🙏 WordPress Integration
|
||||
|
||||
No additional WordPress plugins required! Uses native WordPress APIs:
|
||||
- `window.wp.media` - Media Modal
|
||||
- WordPress REST API - File uploads
|
||||
- Built-in nonce handling
|
||||
- Respects user permissions
|
||||
|
||||
All features work seamlessly with WordPress! 🎉
|
||||
|
||||
Reference in New Issue
Block a user