Skip to content

codeharman/document-editor-with-tiptap

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

77 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ DocuEdit Pro

A powerful, feature-rich document editor built with modern web technologies. Create, edit, and format documents with professional-grade tools, featuring a beautiful interface and seamless export capabilities.

DocuEdit Pro React TypeScript TipTap

✨ Features

🎨 Rich Text Editing

  • Headings & Paragraphs: Support for H1-H4 headings with proper hierarchy
  • Text Formatting: Bold, italic, underline, superscript, and subscript
  • Font Customization: Multiple font families (System, Serif, Monospace) and sizes (12px-48px)
  • Line Spacing: Adjustable line height options (1, 1.15, 1.5, 2)
  • Lists: Bullet and ordered lists with proper nesting and indentation
  • Colors: Text color and background highlighting with color picker
  • Indentation: Custom indent system for paragraphs and headings

🎯 Advanced Features

  • Keyboard Shortcuts: Ctrl/Cmd + B/I/U for quick formatting
  • Export Capabilities:
    • PDF export using html2pdf.js
    • Word document export (.doc format)
  • Theme Support: Beautiful dark/light mode with system preference detection
  • Responsive Design: Mobile-friendly interface
  • Accessibility: ARIA labels and keyboard navigation support

πŸ› οΈ Technical Features

  • Modern Stack: Next.js 15, React 18, TypeScript
  • Rich Editor: TipTap with custom extensions
  • UI Components: Radix UI primitives with shadcn/ui
  • Styling: Tailwind CSS with OKLCH color system
  • Performance: Optimized with dynamic imports and proper SSR handling

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • bun

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/document-editor-with-tip-mukutap.git
    cd document-editor-with-tip-mukutap
  2. Install dependencies

    bun install
  3. Run the development server

    bun run dev
  4. Open your browser Navigate to http://localhost:3000

πŸ“ Project Structure

β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (editor)/
β”‚   β”‚   β”œβ”€β”€ editor-client.tsx    # Client-side editor wrapper
β”‚   β”‚   └── page.tsx              # Main editor page
β”‚   β”œβ”€β”€ layout.tsx               # Root layout with navbar/footer
β”‚   └── globals.css              # Global styles with design tokens
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ editor/
β”‚   β”‚   β”œβ”€β”€ rich-editor.tsx       # Main TipTap editor component
β”‚   β”‚   β”œβ”€β”€ toolbar.tsx           # Comprehensive toolbar
β”‚   β”‚   └── tiptap-extensions.ts  # Custom extensions
β”‚   β”œβ”€β”€ navbar.tsx               # Custom navigation bar
β”‚   β”œβ”€β”€ footer.tsx               # Footer component
β”‚   β”œβ”€β”€ theme-provider.tsx        # Theme context provider
β”‚   β”œβ”€β”€ theme-toggle.tsx          # Dark/light mode toggle
β”‚   └── ui/                       # shadcn/ui components
β”œβ”€β”€ lib/
β”‚   └── utils.ts                  # Utility functions
└── public/                       # Static assets

🎨 Customization

Theme Customization

The project uses a custom design system with OKLCH color space for better color consistency. You can customize colors in app/globals.css:

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  /* ... more color tokens */
}

Adding New Extensions

Create custom TipTap extensions in components/editor/tiptap-extensions.ts:

import { Extension } from "@tiptap/core"

export const CustomExtension = Extension.create({
  name: "customExtension",
  // Your extension logic here
})

Styling Components

The project uses Tailwind CSS with custom design tokens. Components are styled using the cn() utility function for conditional classes.

πŸš€ Deployment

Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Deploy with zero configuration

Other Platforms

The project can be deployed to any platform that supports Next.js:

  • Netlify
  • AWS Amplify
  • Railway
  • DigitalOcean App Platform

πŸ“¦ Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint

πŸ§ͺ Testing

# Run tests (when implemented)
npm run test

# Run tests in watch mode
npm run test:watch

πŸ“š API Reference

Editor Component

import { RichEditor } from '@/components/editor/rich-editor'

// Basic usage
<RichEditor />

Custom Extensions

import { IndentExtension, LineHeightExtension } from '@/components/editor/tiptap-extensions'

// Use in editor configuration
const editor = useEditor({
  extensions: [
    StarterKit,
    IndentExtension,
    LineHeightExtension,
  ],
})

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on how to contribute to this project.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support


Made with ❀️ using Next.js & TipTap

Β© 2025 DocuEdit Pro. All rights reserved.

About

This repository is a Text Editor made using React library Tiptap

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.2%
  • CSS 13.5%
  • JavaScript 0.3%