Private Tool: Turn typed text into realistic handwritten assignments.
LazyScript is a custom tool built to convert digital text into realistic handwritten documents. It supports complex formatting like tables, images, and text alignment, rendering everything onto a canvas that simulates A4 paper.
- Realistic Rendering: Converts text to handwriting using 6 distinct font styles (Standard, Cursive, Messy, etc.).
- Human Imperfections: adjustable Messiness (skew/rotation) and Spacing sliders to mimic natural writing.
- Paper Styles: Toggle between Lined, Grid, or Blank backgrounds.
- Visual Effects:
- Scanner Mode: Adds shadows and noise to look like a scanned document.
- Blue/Red Lines: Adjustable opacity for the page ruling.
- Rich Text: Support for Bold, Underline, and multiple Ink Colors.
- Smart Tables: Create tables with advanced controls to Merge Cells, add/remove rows, and auto-resize columns.
- Case Management: Instantly convert text to UPPERCASE, lowercase, or Title Case.
- Image Support: Drag and drop images which render with a "taped-on" visual effect.
- Prompt Generator: Built-in tool to generate a system prompt for ChatGPT/Gemini. This ensures the AI outputs answers in a format LazyScript can read perfectly (HTML/Tables).
- PDF Export: Downloads high-resolution A4 PDFs.
- Project Files: Save/Load your work using
.lazyJSON files to preserve settings and content.
src/
βββ App.tsx # Core Application Logic (State, Render Loop, UI)
βββ index.css # Tailwind Imports & Custom CSS
βββ main.tsx # React Entry Point
βββ vite-env.d.ts # TypeScript Definitions
public/
βββ shinchan.jpeg # Favicon Image
-
Clone the repository
git clone https://github.com/mr-vabs/lazyscript.git cd lazyscript -
Install Dependencies
npm install
-
Start the Dev Server
npm run dev # Open http://localhost:5173 in your browser
Since this is a private repo, connect your GitHub account to Netlify:
- Push code to this repository.
- Go to Netlify Dashboard -> Add new site -> Import from Git.
- Authorize Netlify to access your Private Repositories.
- Select
lazyscript. - Build Settings:
- Command:
npm run build - Publish directory:
dist
- Command:
- Click Deploy.
- Matrix Table Algorithm: Replaced the simple table parser with a robust 2D Grid System. This fixes alignment issues when using complex
rowSpanandcolSpancombinations. - Code Block Pagination: Code blocks now split cleanly across pages instead of bunching up or getting cut off.
- Ghost Image Fix: Added a
MutationObserverwith cleanup logic to prevent invisible βghostβ empty spaces when dragging and dropping images.
- Advanced Anti-OCR: The PDF exporter now applies a heavy noise filter and rotates the entire page by 0.5Β°, preventing PDF readers from selecting text and ensuring a flat scanned-image look.
- UI Updates:
- Swapped Delete Image icon β Backspace
- Swapped Clear Canvas β Refresh / New Page
- Pagination Logic: Improved
flushLinehandling to prevent gaps at the bottom of pages when font sizes change dynamically.
- Code Block Support: Added a parser for
<pre>tags. Code now renders with:- A distinct left-side vertical border
- Preserved indentation and spacing
- Scanner Mode V1: Introduced the Xerox Effect (High Contrast + Grayscale) for PDF exports.
- Image Positioning: Fixed a bug where inserting an image would always place it at the end of the text. Images now correctly respect the cursor position.
- Table Columns: Added specific logic to handle Column Deletion correctly without breaking layout.
- Pen Tool: Added a toggle to switch between Text Mode and Drawing Mode.
- Bezier Curves: Implemented smooth stroke rendering for natural-looking digital ink.
- Undo System: Added Undo2 functionality specifically optimized for drawing strokes.
- Ink Sync: Drawing color now syncs automatically with the selected Text Color.
- Responsive Header: Fixed z-index and padding issues to ensure the header doesnβt overlap the paper on mobile devices.
- Toolbar Wrap: Toolbar buttons now wrap gracefully on smaller screens.
- Paste AI: Added a button to parse HTML directly from the system clipboard.
- AI Integration: Added a Robot Icon π€ to the toolbar to copy the specialized AI system prompt.
- Table Merging: Added logic to merge table cells both Right and Down (
rowSpan/colSpan). - Case Converter: Added a dropdown menu to toggle text case without retyping.
- Paper Types: Introduced logic to switch between Lined, Grid, and Blank paper (
setPaperType). - Toast System: Replaced standard browser
alert()with a custom, non-intrusive Toast Notification system for errors and success messages.
- Safety: Added a 3-stage confirmation to the Clear button (
Clear?->Really??) to prevent accidents. - Rendering: Added a visual "tape" effect to inserted images (
ctx.fillRectcorners). - Performance: Implemented a debounce (300ms) on the parser to prevent lag while typing.
- UI: Fully implemented Dark Mode styling for the toolbar and editor.
- Critical Fix (TS2367): Changed the declaration of dominantAlign in the Renderer loop to explicitly allow all 3 states: 'left' | 'center' | 'right'.
- Explicit Casting: Added specific type casting inside the loop (seg.align as ...) to ensure data flows correctly without narrowing.
- Strict Typing: Ensured AlignType is used consistently across the parser and renderer.
- UI Fix: Restored the Line Opacity slider.
- Organization: Grouped all 4 customization sliders (Messiness, Size, Spacing, Opacity) in the UI.
- Mobile Responsive: Layout adapts to vertical stack on mobile devices.
- Text Case Tools: Added menu to transform text case (Upper/Lower/Title).
- Branding: Added custom Shinchan favicon.
- Fix: Restored Font Size slider functionality.
- Letter Spacing: Added slider to manipulate space between characters.
- Fonts: Integrated Google Fonts to replace broken external links.
- UI: Improved Font Dropdown UI.
- Alignment: Added visual support for Left, Center, and Right alignment.
- Rendering: Switched table drawing from
recttolinestrokes to fix border overlap.
- Images: Added "Select to Delete" functionality (Blue border).
- Bugfix: Prevented images from being inserted into the toolbar.
- Layout: Fixed editor scrolling issues with large images.
- Tables: Added logic for Merging Rows and Columns.
- Engine: Rewrote table engine to use a coordinate grid system.
- Core: Implemented
DOMPurifyfor security. - UI: Added Dark Mode and Sticky Header.
This project is maintained privately. Please do not share access tokens or .lazy or .json files containing sensitive data publicly.