google-labs-jules[bot] 144bfb2ba7 feat: Implement Google Docs-style editor with ODT export
This commit introduces a complete overhaul of the application, replacing the
previous simple Markdown editor with a powerful, Google Docs-style
editor with a live preview and ODT export.

The new features include:
- A new three-pane UI with a Markdown editor, a live preview, and a
  styles panel.
- A powerful styling engine that allows users to create, edit, and
  apply custom styles to the document.
- A persistent storage mechanism for styles using a JSON file.
- Support for advanced Markdown features, including code blocks and
  blockquotes.
- A hyperlinked table of contents that is automatically generated from
  the headings in the document.
- Auto-captioning for tables and images.
- Pagination for large tables.
- Secure image embedding with a domain whitelist and size limits to
  prevent SSRF and DoS attacks.
- An improved live preview that correctly renders multi-line Markdown
  elements.
2025-12-05 12:17:59 +00:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00
2025-09-15 07:48:37 +03:00

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:

    pip install -r requirements.txt
    
  2. Run the application:

    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
S
Description
No description provided
Readme 182 MiB
Languages
Python 98.2%
Batchfile 0.9%
TeX 0.3%
VBA 0.3%
HTML 0.2%