bayan-api / src /js /format.js

Commit History

feat: Complete ALL plan items — gradient tokens, nav scroll glow, focus rings, dropdown keyboard nav, color reset, network delay indicator
97ed8d3

youssefreda9 commited on

fix: unified undo/redo - toolbar+keyboard use same stack, works with typing+formatting+Quran apply
bf8500f

youssefreda9 commited on

fix: Document search was using wrong selector '.doc-item' instead of '.doc-list-item'
7e5f112

youssefreda9 commited on

remove: List buttons + indent + all related CSS/JS - Remove bullet list and ordered list buttons from toolbar - Remove formatList() function from format.js - Remove blockquote/ul/ol/li CSS from components.css - Keep clear format button
afcf829

youssefreda9 commited on

fix: Rewrite list creation with manual DOM manipulation - execCommand('insertUnorderedList/OrderedList') doesn't work with pre-wrap - New approach: manually creates ul/ol + li elements from selected text - Splits text by newlines, creates proper li for each line - Toggle support: click again to remove list - Empty editor: inserts empty list item ready to type - Works regardless of white-space mode
7475e97

youssefreda9 commited on

fix: Lists now work with pre-wrap editor - formatList() temporarily switches white-space to normal - Executes insertUnorderedList/insertOrderedList - Restores pre-wrap via requestAnimationFrame - Buttons now call formatList() instead of execFormat()
4648830

youssefreda9 commited on

fix: Sentence count + reading time stats - Sentences: split by . ! ? ؟ and newlines (not just periods) - At least 1 sentence if text exists, 0 if empty - Reading time: 180 words/min for Arabic, shows 0 when empty - Minimum 1 minute when text exists
1527e69

youssefreda9 commited on

fix: Critical editor bugs - Dropdowns now visible (remove overflow:hidden from editor-shell) - Font/size/color menus z-index 200 (above editor) - Selection collapses after formatting (no more blue highlight) - Spelling overlay uses textContent for consistent offsets - Correction preserves formatting (replaces inside parent node) - Alt correction same fix - Fallback finds span by matching original text
16da498

youssefreda9 commited on

feat: 12 UI improvements batch - 1. Editor surface flush (no margin/border, Google Docs style) - 2. Custom styled summary slider (gradient thumb) - 3. Empty states with icons for suggestions - 4. Enhanced status bar (chars, sentences, reading time) - 5. Mobile scrollable formatting toolbar - 6. Summary word count + compression ratio - 7. Document search bar with filter - 8. Text color + highlight color pickers - 9. Lists (bullet/ordered) + indent/outdent + clear format - 10. Animated sun/moon theme toggle - 11. Summary bullet points mode toggle - 12. Print styles (only editor content)
afdf449

youssefreda9 commited on

feat: Premium formatting toolbar redesign - Custom dropdown menus for font family and size (animated, styled) - Pill-shaped button groups with gradient active states - Alignment applies to paragraph with selection (standard behavior) - Undo/Redo works for typing + formatting (browser native stack) - Font preview in size dropdown - Professional visual polish
d4d18df

youssefreda9 commited on

feat: Rich text formatting toolbar + formatting-preserving renderer - Bold, Italic, Underline, Strikethrough, Alignment, Undo/Redo - Font family and font size dropdowns - New DOM-level overlay renderer (preserves formatting during analysis) - Apply/dismiss corrections keep original formatting
036913a

youssefreda9 commited on