302 lines
8.6 KiB
Markdown
302 lines
8.6 KiB
Markdown
# WYSIWYG Editor Refactoring Plan
|
||
|
||
## Current Status
|
||
|
||
The `dees-wysiwyg-block.ts` file has grown to over 2100 lines and contains:
|
||
- Main component logic
|
||
- CSS styles for all block types
|
||
- Rendering logic for each block type
|
||
- Setup methods for each block type
|
||
- Helper methods for various functionality
|
||
|
||
This makes the file difficult to maintain and extend.
|
||
|
||
## Refactoring Goals
|
||
|
||
1. **Modularity**: Each block type should be self-contained
|
||
2. **Extensibility**: Adding new block types should be straightforward
|
||
3. **Maintainability**: Code should be organized by responsibility
|
||
4. **Type Safety**: Strong interfaces to ensure consistent implementation
|
||
5. **Performance**: Enable potential lazy loading of block types
|
||
|
||
## Proposed File Structure
|
||
|
||
```
|
||
ts_web/elements/wysiwyg/
|
||
|