feat: implement professional HTML ↔ Markdown conversion for group editing
- Add marked and turndown libraries for bidirectional conversion - Create comprehensive MarkdownConverter utility with proper paragraph preservation - Implement perfect round-trip HTML→Markdown→HTML conversion - Add rich formatting support (bold, italic, paragraphs) with live preview - Fix save handler conflict where general editor overwrote group changes - Implement debounced live preview for group editing (500ms like regular elements) - Enable dynamic paragraph creation/removal during markdown editing - Add comprehensive test cases with HTML formatting examples Result: World-class drop-in markdown editing with 29KB bundle size
This commit is contained in:
@@ -106,6 +106,12 @@ export class InsertrEditor {
|
||||
}
|
||||
|
||||
updateElementContent(element, formData) {
|
||||
// Skip updating group elements - they're handled by the form renderer
|
||||
if (element.classList.contains('insertr-group')) {
|
||||
console.log('🔄 Skipping group element update - handled by form renderer');
|
||||
return;
|
||||
}
|
||||
|
||||
if (element.tagName.toLowerCase() === 'a') {
|
||||
// Update link element
|
||||
if (formData.text !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user