# GhostEditor - Markdown to Word Converter A web-based application that converts Markdown to Word documents with advanced features including real-time preview, styling options, auto-captioning, and table pagination. ## Features 1. **Real-time Conversion**: See your Markdown text convert to Word format in real-time 2. **Styling Options**: Apply different styles to text elements (headings, quotes, code blocks, etc.) 3. **Auto Captioning**: Automatic captions for images, tables, and figures 4. **Table Pagination**: Support for tables that span across pages with repeating headers 5. **Custom Settings**: Configure document settings and styling preferences ## Requirements - Python 3.7+ - Flask - python-docx - markdown ## Installation 1. Install the required packages: ```bash pip install -r requirements.txt ``` 2. Run the application: ```bash python app.py ``` 3. Open your browser and navigate to `http://localhost:5000` ## Usage 1. Enter or paste your Markdown content in the left editor panel 2. See the real-time conversion in the right preview panel 3. Use the settings panel to configure document options: - Set document title - Choose default text style - Enable/disable auto-captioning for images, tables, and figures - Enable/disable table pagination 4. Use the toolbar buttons to format text directly in the editor 5. Select block type and apply custom styles to specific elements 6. Add custom captions to elements as needed 7. Click "Export to Word" to download your document ## Features Explained ### Real-time Preview - The application converts Markdown to Word format as you type - Preview updates automatically as you make changes ### Auto Captioning - Images automatically receive "Figure X" captions - Tables automatically receive "Table X" captions - Captions are numbered sequentially ### Table Pagination - When enabled, tables that span multiple pages will repeat their header row - This ensures readability when tables cross page boundaries ### Block Styling - Select different block types (paragraph, heading, list, etc.) - Apply specific styles to different content blocks - Add custom captions to any element ## File Structure ``` /workspace/ ├── app.py # Main Flask application ├── requirements.txt # Python dependencies ├── templates/ │ └── index.html # Main HTML template └── static/ ├── style.css # CSS styling └── script.js # JavaScript functionality ``` ## Technologies Used - **Frontend**: HTML, CSS, JavaScript, Bootstrap 5, Marked.js - **Backend**: Flask (Python) - **Document Processing**: python-docx - **Markdown Processing**: markdown (Python library) ## Customization You can customize the application by modifying: - `static/style.css` for visual styling - `static/script.js` for client-side functionality - `app.py` for server-side processing and document generation