Complete library cleanup and documentation overhaul
## Library Code Cleanup (~1,200+ lines removed) - Remove legacy markdown system (markdown.js, previewer.js) - Delete unused EditContext code from ui/editor.js (~400 lines) - Remove version history UI components from form-renderer.js (~180 lines) - Clean unused CSS styles from insertr.css (~120 lines) - Update package.json dependencies (remove marked, turndown) ## Documentation Updates - README.md: Update from markdown to HTML-first approach - AGENTS.md: Add current architecture guidance and HTML-first principles - TODO.md: Complete rewrite with realistic roadmap and current status - demos/README.md: Update for development demo server usage ## System Reality Alignment - All documentation now reflects current working system - Removed aspirational features in favor of actual capabilities - Clear separation between development and production workflows - Accurate description of style-aware editor with HTML preservation ## Code Cleanup Benefits - Simplified codebase focused on HTML-first approach - Removed markdown conversion complexity - Cleaner build process without unused dependencies - Better alignment between frontend capabilities and documentation Ready for Phase 3a server updates with clean foundation.
This commit is contained in:
@@ -155,8 +155,8 @@ export class InsertrEditor {
|
||||
return 'link';
|
||||
}
|
||||
|
||||
// ALL text elements use markdown for consistent editing experience
|
||||
return 'markdown';
|
||||
// ALL text elements use text content type
|
||||
return 'text';
|
||||
}
|
||||
|
||||
handleCancel(meta) {
|
||||
|
||||
@@ -135,7 +135,7 @@ export class InsertrCore {
|
||||
const tag = element.tagName.toLowerCase();
|
||||
|
||||
if (element.classList.contains('insertr-group')) {
|
||||
return 'markdown';
|
||||
return 'group';
|
||||
}
|
||||
|
||||
switch (tag) {
|
||||
@@ -146,9 +146,9 @@ export class InsertrCore {
|
||||
case 'a': case 'button':
|
||||
return 'link';
|
||||
case 'div': case 'section':
|
||||
return 'markdown';
|
||||
return 'text';
|
||||
case 'span':
|
||||
return 'markdown'; // Match backend: spans support inline markdown
|
||||
return 'text';
|
||||
default:
|
||||
return 'text';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user