- Implemented DeesInputFileupload component with file upload functionality, including drag-and-drop support, file previews, and clear all option. - Developed DeesInputRichtext component featuring a rich text editor with a formatting toolbar, link management, and word count display. - Created demo for DeesInputRichtext showcasing various use cases including basic editing, placeholder text, different heights, and disabled state. - Added styles for both components to ensure a consistent and user-friendly interface. - Introduced types for toolbar buttons in the rich text editor for better type safety and maintainability.
377 lines
12 KiB
Markdown
377 lines
12 KiB
Markdown
# WYSIWYG Editor Refactoring Plan
|
||
|
||
## 2025-?? - Component Subfolder Refactor
|
||
- [x] Inventory large single-file components and dependencies
|
||
- [x] Refactor dees-input-datepicker into subfolder structure
|
||
- [x] Refactor dees-input-fileupload into subfolder structure
|
||
- [x] Refactor dees-input-richtext into subfolder structure
|
||
- [x] Refactor dees-chart-area into subfolder structure
|
||
- [x] Refactor dees-appui-appbar into subfolder structure
|
||
- [x] Update exports/imports and verify build
|
||
|
||
|
||
## 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/
|
||
|