Codex is a lightweight, real-time web-based Markdown previewer and editor. As you type in the editor, it automatically converts your Markdown into rendered HTML on the fly. It features line numbers, debounced input handling, and syntax highlighting.
- Real-Time Preview: Instantly see your rendered Markdown as you type.
- Dynamic Line Numbering: The editor includes synchronized line numbers that track your cursor position and scrolling.
- Debounced Updates: Optimized rendering performance through debounced input actions to prevent unnecessary rendering.
- Keyboard Shortcuts: Tab support for smooth writing.
- Standard Markdown Support: Powered by
marked, supporting standard Markdown and GitHub Flavored Markdown (GFM).
- Frontend: Vanilla JavaScript (ES6+), HTML5, CSS3, DOM API,
fetch. - Backend: Node.js, Express.js.
- Markdown Parser:
markedlibrary.
- Node.js installed on your machine.
pnpmornpmpackage manager.
-
Clone the repository and navigate into the project directory:
cd Codex -
Install the necessary dependencies:
npm run install:pnpm # or simply `npm install` -
Start the application:
- For development (using nodemon for hot-reloading):
npm run dev
- For production:
npm start
- For development (using nodemon for hot-reloading):
-
Open your browser and navigate to:
http://localhost:5000
index.html: The main markup structure.client.js: Frontend logic, handling the editor, fetch requests, line numbering, and preview updates.style.css: Application styling.server.js: Express backend that serves static files and provides the/api/convertendpoint.package.json: Project metadata and dependencies.
