Commit Graph

24 Commits

Author SHA1 Message Date
a5628019f8 revert b1dbd85346
revert richtext replacement
2025-09-21 10:13:48 +02:00
Stefan Hardegger
b1dbd85346 richtext replacement 2025-09-21 10:10:04 +02:00
Stefan Hardegger
aae8f8926b removing typesense 2025-09-20 14:39:51 +02:00
Stefan Hardegger
64f97f5648 Settings reorganization 2025-09-17 15:06:35 +02:00
Stefan Hardegger
c0b3ae3b72 embedded image finishing 2025-09-17 10:28:35 +02:00
Stefan Hardegger
c7b516be31 phase 1 and 2 of embedded images 2025-09-16 14:58:50 +02:00
Stefan Hardegger
f92dcc5314 Advanced Filters - Build optimizations 2025-09-04 15:49:24 +02:00
Stefan Hardegger
702fcb33c1 Improvements to Editor 2025-09-02 09:28:06 +02:00
Stefan Hardegger
a660056003 Various improvements 2025-08-21 13:55:38 +02:00
Stefan Hardegger
6128d61349 Library Switching functionality 2025-08-20 15:10:40 +02:00
Stefan Hardegger
8eb126a304 performance 2025-08-18 19:27:57 +02:00
Stefan Hardegger
1a99d9830d Tag Enhancement + bugfixes 2025-08-17 17:16:40 +02:00
Stefan Hardegger
460ec358ca New Switchable Library Layout 2025-08-14 19:46:50 +02:00
Stefan Hardegger
75c207970d Changing Authors 2025-08-12 12:57:34 +02:00
Stefan Hardegger
3b22d155db restructuring 2025-08-11 14:40:56 +02:00
Stefan Hardegger
51e3d20c24 various fixes 2025-08-11 08:15:20 +02:00
Stefan Hardegger
379c8c170f Various improvements & Epub support 2025-08-08 14:09:14 +02:00
Stefan Hardegger
fcad028959 scraping and improvements 2025-07-28 13:52:09 +02:00
Stefan Hardegger
f95d7aa8bb Various Fixes and QoL enhancements. 2025-07-26 12:05:54 +02:00
Stefan Hardegger
312093ae2e Story Collections Feature 2025-07-25 14:15:23 +02:00
Stefan Hardegger
d489078721 Improve RichTextEditor to preserve formatting on paste
**Enhanced Visual Mode:**
- Add paste event handler that preserves HTML formatting when pasting
- Integrate with shared sanitization configuration for consistent filtering
- Preload sanitization config for optimal performance
- Support for bold, italic, and other basic formatting in visual mode

**Updated Sanitization Config:**
- Add more useful HTML tags: kbd, samp, var, details, summary, colgroup, col
- Add attributes for better table support: start, type for ol
- Add style attributes for more elements: table, ul, ol, li, blockquote, pre, code
- Maintain security while allowing richer content formatting

**User Experience:**
- Users can now paste formatted content (bold, italic, lists, etc.) in visual mode
- Content is automatically sanitized using backend configuration
- Updated help text to reflect new capabilities
- Maintains backward compatibility with plain text input

**Technical Improvements:**
- Async clipboard API support with fallbacks
- Error handling for paste operations
- Consistent sanitization between manual input and paste operations

Resolves issue where pasted formatted content was stripped to plain text in visual mode.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 16:51:50 +02:00
Stefan Hardegger
5a48ebcfeb Implement shared HTML sanitization configuration
**Backend Changes:**
- Add html-sanitization-config.json with allowedTags, allowedAttributes, and allowedCssProperties
- Create HtmlSanitizationConfigDto for configuration data transfer
- Update HtmlSanitizationService to load configuration from JSON file with fallback
- Add HtmlSanitizationController with public API endpoint at /api/config/html-sanitization
- Update SecurityConfig to allow public access to /api/config/** endpoints

**Frontend Changes:**
- Add configApi.getHtmlSanitizationConfig() to fetch backend configuration
- Create sanitization.ts utility with sanitizeHtml() and sanitizeHtmlSync() functions
- Update story reading page to use shared sanitization configuration
- Add preloadSanitizationConfig() for early configuration loading
- Handle TrustedHTML type conversion and DOMPurify config compatibility

**Benefits:**
- Consistent HTML sanitization rules between frontend and backend
- Centralized configuration in JSON file for easy maintenance
- Automatic fallback to safe defaults if configuration loading fails
- API-driven approach allows runtime configuration updates
- Maintains security while providing flexibility for content formatting

Resolves HTML sanitization inconsistencies and provides foundation for configurable content safety rules.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 16:18:03 +02:00
Stefan Hardegger
d69bed00a2 MVP Version 2025-07-23 12:28:48 +02:00
Stefan Hardegger
59d29dceaf inital working version 2025-07-22 21:49:40 +02:00