**Title:** Implement real-time Markdown to Word conversion with advanced formatting and auto-captioning
- Added `app.py` with Flask backend for real-time Markdown to Word conversion using python-docx - Implemented `convert_md_to_docx` function with support for headings, tables, code blocks, images, and blockquote styling - Created `templates/index.html` with responsive UI featuring dual-panel editor/preview layout - Added `static/script.js` for client-side functionality including live preview, toolbar buttons, and export workflow - Enhanced `static/style.css` with modern styling for editor, preview, and settings panels - Updated `README.md` to document features, usage, and customization options - Added `requirements.txt` with dependencies: Flask, python-docx, markdown - Implemented auto-captioning for images and tables with sequential numbering - Added table pagination support with header repetition across page breaks - Integrated configuration settings panel for customizing styles, captions, and document options
This commit is contained in:
@@ -0,0 +1,165 @@
|
||||
/* GhostEditor - Markdown to Word Converter Styles */
|
||||
body {
|
||||
background-color: #f8f9fa;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
.card {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background-color: #e9ecef;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#markdownInput {
|
||||
resize: none;
|
||||
height: 500px;
|
||||
font-family: 'Courier New', monospace;
|
||||
}
|
||||
|
||||
.preview-container {
|
||||
min-height: 500px;
|
||||
background-color: white;
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
#previewOutput {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
/* Markdown preview styling */
|
||||
#previewOutput h1 {
|
||||
color: #2c3e50;
|
||||
border-bottom: 2px solid #3498db;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#previewOutput h2 {
|
||||
color: #34495e;
|
||||
border-bottom: 1px solid #bdc3c7;
|
||||
padding-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
#previewOutput h3 {
|
||||
color: #5d6d7e;
|
||||
}
|
||||
|
||||
#previewOutput table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
#previewOutput table,
|
||||
#previewOutput th,
|
||||
#previewOutput td {
|
||||
border: 1px solid #bdc3c7;
|
||||
}
|
||||
|
||||
#previewOutput th,
|
||||
#previewOutput td {
|
||||
padding: 0.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#previewOutput th {
|
||||
background-color: #ecf0f1;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#previewOutput pre {
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 0.375rem;
|
||||
padding: 1rem;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
#previewOutput code {
|
||||
background-color: #f1f2f6;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 0.25rem;
|
||||
font-family: 'Courier New', monospace;
|
||||
}
|
||||
|
||||
#previewOutput blockquote {
|
||||
border-left: 4px solid #3498db;
|
||||
margin: 1rem 0;
|
||||
padding-left: 1rem;
|
||||
color: #7f8c8d;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#previewOutput img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
/* Style preview */
|
||||
#stylePreview {
|
||||
min-height: 100px;
|
||||
border: 1px dashed #ced4da;
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.container-fluid {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.row > div {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Table pagination styles */
|
||||
.table-pagination-header {
|
||||
background-color: #ecf0f1;
|
||||
font-weight: bold;
|
||||
border-top: 2px solid #3498db !important;
|
||||
}
|
||||
|
||||
/* Caption styles */
|
||||
.caption {
|
||||
font-size: 0.9rem;
|
||||
color: #7f8c8d;
|
||||
text-align: center;
|
||||
margin-top: 0.5rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Button styling */
|
||||
.btn-outline-secondary.btn-sm {
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* Scrollbar styling */
|
||||
.preview-container::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
.preview-container::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.preview-container::-webkit-scrollbar-thumb {
|
||||
background: #c1c1c1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.preview-container::-webkit-scrollbar-thumb:hover {
|
||||
background: #a8a8a8;
|
||||
}
|
||||
Reference in New Issue
Block a user