A clean, lightweight markdown notes application with live side-by-side editor and preview, built with vanilla HTML, CSS, and JavaScript.
- Live Editing: Real-time markdown preview as you type
- Note Management: Create, edit, delete, and organize notes
- Tagging System: Organize notes with tags and filter by tags
- Templates: Pre-built templates for common note types:
- Meeting Notes
- Daily Journal
- Project Plan
- Book Summary
- To-Do List
- Blank Note
- Persistence: Notes saved automatically to localStorage (with optional Puter cloud sync)
- Theming: Light/Dark mode toggle with system preference detection
- Formatting Toolbar: One-click markdown formatting (bold, italic, lists, links, code, etc.)
- Search: Full-text search across note titles and content
- Export/Import: Export notes as markdown files
- Keyboard Shortcuts: Ctrl/Cmd+B (bold), Ctrl/Cmd+I (italic), Ctrl/Cmd+K (link), Ctrl/Cmd+S (save)
- Responsive Design: Works on desktop and mobile devices
- PWA Capable: Can be installed as a Progressive Web App
markdown_notes_app/
├── index.html # Main HTML structure
├── app.js # Application logic and state management
├── styles.css # Styling and dark mode support
├── manifest.json # PWA manifest
��── icons/ # App icons (icon-192.png, icon-512.png, maskable-512.png)
The application uses a simple state model stored in JavaScript variables:
notes: Array of note objects containing title, body, tags, timestampsactiveId: ID of the currently selected notesearchTerm: Current search filteractiveTag: Currently selected tag filterviewMode: Current view layout (split, editor-only, preview-only)
Data persistence is handled through:
- Primary: Puter KV storage (if user is signed in)
- Fallback: browser localStorage
- Editor:
<textarea>for markdown input - Preview:
<article>element that renders markdown to HTML using Marked.js and DOMPurify - Sidebar: List of notes with search and filtering capabilities
- Toolbar: Formatting buttons for common markdown syntax
- Modal: Template selector for creating notes from predefined templates
- Uses Marked.js for markdown-to-HTML conversion
- Uses DOMPurify for sanitizing HTML output
- Configured with GFM (GitHub Flavored Markdown) and line breaks enabled
- Clone or download this repository
- Open
index.htmlin a modern web browser - Start taking notes immediately - no setup required
Works in all modern browsers that support:
- ES6 Modules
- localStorage/sessionStorage
- CSS Custom Properties
- Flexbox and Grid Layout
Edit the TEMPLATES array in app.js to add new note templates. Each template should have:
id: Unique identifiername: Display namedesc: Description shown in template pickericon: Lucide icon nameaccent: CSS classes for color accenttitle: Function returning default titlebody: Function returning default markdown content
Modify the Tailwind CSS configuration in index.html:
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
brand: { DEFAULT: '#4f46e5', dark: '#4338ca', light: '#818cf8' }
},
fontFamily: {
sans: ['Inter', 'ui-sans-serif', 'system-ui', 'sans-serif'],
mono: ['ui-monospace', 'SFMono-Regular', 'Menlo', 'monospace']
}
}
}
}This project uses no build tools or dependencies beyond CDN-loaded libraries. To modify:
- Edit
index.htmlfor structural changes - Modify
app.jsfor logic and functionality changes - Update
styles.cssfor styling adjustments - Changes take effect immediately when refreshing the browser
- Lucide Icons - via jsdelivr
- Tailwind CSS - via jsdelivr
- Marked.js - via jsdelivr
- DOMPurify - via jsdelivr
- Notes are stored locally in your browser by default
- Optional cloud synchronization requires signing into Puter.com
- No tracking or analytics included
- All processing happens client-side
Built with:
- Lucide Icons
- Tailwind CSS
- Marked.js
- DOMPurify
- Puter.com (for optional cloud sync)
MIT License - feel free to use, modify, and distribute this application.
Note: This application was created using the Puter.com builder platform.