# marcelinombb/tiptap-exitus architecture

> Architecture diagram of the GitHub repository marcelinombb/tiptap-exitus, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marcelinombb/tiptap-exitus
- Repository: https://github.com/marcelinombb/tiptap-exitus

## Overview

##### Main Components Identification

The system should be represented with these key components:

a) Core Editor Layer
- ExitusEditor (main class)
- Plugin System
- UI Components
- Toolbar System

b) Extensions Layer
- Text Formatting Extensions (bold, italic, underline, etc.)
- Advanced Features (tables, math, images)
- Utility Extensions (history, indent, etc.)

c) External Integrations
- Tiptap/ProseMirror Foundation
- MathType Integration
- Image Processing System

**┌─ Application Layer ─────────────────────┐**
- ExitusEditor (Main Class)              │
- Event System (create, update)          │
- ┬────────────────────┘
- ↓
**┌─ Core Components ─────────────────────┐**
- ┌─────────┐ ┌─────────┐ ┌─────────┐  │
- Toolbar │ │   UI    │ │ Plugin  │  │
- ┘ └─────────┘ └─────────┘  │
- ┬────────────────────┘
- ↓
**┌─ Extensions Layer ────────────────────┐**
- ┌─────────┐ ┌─────────┐ ┌─────────┐  │
- Text   │ │ Advanced│ │ Utility │  │
- Formatting│ │Features │ │Extensions│  │
- ┘ └─────────┘ └─────────┘  │
- ┬────────────────────┘
- ↓
**┌─ Foundation Layer ───────────────────┐**
- Tiptap/ProseMirror                   │
- ┘

##### Component Relationships

- Data flow between components
- Plugin registration paths
- Event propagation
- Extension initialization flow

##### Detailed Component Breakdown

For each major component, show:
- Internal structure (e.g., Toolbar → Tools → Button)
- Configuration options
- API endpoints
- Event handlers

##### Implementation Details

Notes for:
- TypeScript integration
- Webpack build process
- CSS/Style management
- Extension loading mechanism

##### The integration points with external services

Remember to:
- Use consistent symbols throughout
- Version information
- Document configuration options

- How components interact
- Where to add new features
- How to debug issues
- How to extend the editor

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Application Layer"
        Editor["ExitusEditor"]
        EventSystem["Event System"]
    end

    subgraph "Core Components"
        direction TB
        Toolbar["Toolbar System"]
        UI["UI System"]
        Plugin["Plugin System"]
    end

    subgraph "Extensions Layer"
        direction TB
        TextFormat["Text Formatting"]
        AdvFeatures["Advanced Features"]
        UtilExt["Utility Extensions"]
        
        subgraph "Text Formatting Components"
            Bold["Bold"]
            Italic["Italic"]
            Underline["Underline"]
            Strike["Strike"]
        end
        
        subgraph "Advanced Feature Components"
            TableSystem["Table System"]
            MathSystem["Math Integration"]
            ImageSystem["Image System"]
            
            subgraph "Table Components"
                TableCore["Table Core"]
                TableView["Table View"]
                TableCell["Cell Management"]
                TableUtil["Table Utilities"]
            end
        end
        
        subgraph "Utility Components"
            History["History"]
            Indent["Indent"]
            FormatClear["Format Clear"]
        end
    end

    subgraph "UI Components"
        Balloon["Balloon"]
        Button["Button"]
        Dropdown["Dropdown"]
    end

    subgraph "Foundation Layer"
        TipTap["Tiptap/ProseMirror"]
    end

    Editor --> EventSystem
    EventSystem --> |Manages| CoreComponents
    CoreComponents --> |Extends| ExtensionsLayer
    ExtensionsLayer --> |Built on| TipTap

    %% Component Mappings
    click Editor "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/ExitusEditor.ts"
    click Plugin "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/editor/Plugin.ts"
    click UI "https://github.com/marcelinombb/Tiptap-Exitus/tree/main/src/editor/ui/"
    click Toolbar "https://github.com/marcelinombb/Tiptap-Exitus/tree/main/src/editor/toolbar/"
    click Bold "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/bold/BoldPlugin.ts"
    click Italic "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/italic/ItalicPlugin.ts"
    click Underline "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/underline/UnderlinePlugin.ts"
    click Strike "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/strike/StrikePlugin.ts"
    click TableSystem "https://github.com/marcelinombb/Tiptap-Exitus/tree/main/src/extensions/table/"
    click MathSystem "https://github.com/marcelinombb/Tiptap-Exitus/tree/main/src/extensions/mathtype/"
    click ImageSystem "https://github.com/marcelinombb/Tiptap-Exitus/tree/main/src/extensions/image/"
    click History "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/history/HistoryPlugin.ts"
    click Indent "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/indent/IndentPlugin.ts"
    click FormatClear "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/format-clear/FormatClearPlugin.ts"
    click Balloon "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/editor/ui/Balloon.ts"
    click Button "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/editor/ui/Button.ts"
    click Dropdown "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/editor/ui/Dropdown.ts"
    click TableCore "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/table/table.ts"
    click TableView "https://github.com/marcelinombb/Tiptap-Exitus/blob/main/src/extensions/table/TableView.ts"
    click TableCell "https://github.com/marcelinombb/Tiptap-Exitus/tree/main/src/extensions/table-cell/"
    click TableUtil "https://github.com/marcelinombb/Tiptap-Exitus/tree/main/src/extensions/table/extension-table/src/utilities/"

    classDef default fill:#f9f9f9,stroke:#333,stroke-width:1px
    classDef core fill:#b3e0ff,stroke:#333,stroke-width:1px
    classDef extension fill:#98FB98,stroke:#333,stroke-width:1px
    classDef external fill:#FFA07A,stroke:#333,stroke-width:1px
    classDef ui fill:#DDA0DD,stroke:#333,stroke-width:1px

    class Editor,EventSystem core
    class Toolbar,UI,Plugin core
    class TextFormat,AdvFeatures,UtilExt,Bold,Italic,Underline,Strike,TableSystem,MathSystem,ImageSystem,History,Indent,FormatClear extension
    class TipTap external
    class Balloon,Button,Dropdown ui
    class TableCore,TableView,TableCell,TableUtil extension
```
