feat: enable markdown processing for span elements

Backend changes:
- Updated parser to treat <span> elements as markdown by default
- Changed span content type detection from ContentText to ContentMarkdown
- Spans now support **bold**, *italic*, and [links](url) formatting

Frontend changes:
- Updated content type detection to match backend behavior
- Frontend now treats spans as markdown elements for consistent processing
- Editor preview behavior now matches server-side enhancement

Benefits:
- <span class='highlight'>**bold** text</span> now processes markdown correctly
- Inline elements maintain all styling while supporting rich formatting
- Complete frontend/backend consistency for span element handling
- Expands markdown support to common inline wrapper elements

Tested and verified:
- Span elements preserve all classes, IDs, and styles
- Bold, italic, and link formatting works in span elements
- Content type properly detected as 'markdown' in both systems
This commit is contained in:
2025-09-11 16:55:39 +02:00
parent 1980b8d305
commit cfb744f091
3 changed files with 6 additions and 5 deletions

View File

@@ -339,6 +339,8 @@ export class InsertrCore {
return 'link';
case 'div': case 'section':
return 'markdown';
case 'span':
return 'markdown'; // Match backend: spans support inline markdown
default:
return 'text';
}