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

@@ -23,8 +23,7 @@
<section class="hero">
<div class="container">
<h1 class="insertr" data-content-id="hero-title-7cfeea" data-content-type="text">Transform Your Business with Expert Consulting</h1>
<p class="lead insertr" data-content-id="footer-text-d73f32" data-content-type="markdown"><p>We help small businesses <strong>grow</strong> through strategic planning, process optimization, and digital transformation. Our team brings 15+ years of experience to drive your success. Superb</p>
</p>
<p class="lead insertr" data-content-id="footer-text-d73f32" data-content-type="markdown"><strong>We</strong> help small businesses grow through strategic planning, process optimization, and digital transformation. Our team brings 15+ years of experience to drive your success. Superb</p>
<a href="contact.html" class="btn-primary insertr" data-content-id="link-d11ae9" data-content-type="link">Get Started Today?</a>
</div>
</section>
@@ -75,8 +74,7 @@
<footer class="footer">
<div class="container">
<p class="insertr" data-content-id="footer-text-a2b6a8-22fbf8" data-content-type="markdown">© 2024 Acme Consulting Services. All rights reserved.</p>
<p class="insertr" data-content-id="footer-text-d73f32" data-content-type="markdown"><p>We help small businesses <strong>grow</strong> through strategic planning, process optimization, and digital transformation. Our team brings 15+ years of experience to drive your success. Superb</p>
</p>
<p class="insertr" data-content-id="footer-text-d73f32" data-content-type="markdown"><strong>We</strong> help small businesses grow through strategic planning, process optimization, and digital transformation. Our team brings 15+ years of experience to drive your success. Superb</p>
</div>
</footer>