How ajaxorg/ace works
Ace is an embeddable browser-based code editor. A user edits text through the editor; the edit session manages document state and language behavior, while the renderer presents that state in the browser. The README also documents language modes, themes, search, folding, completion, multiple selections, and optional syntax checking. Paths identify the relevant implementation files or enclosing directories; several feature modules were not sampled, so their internal wiring is not asserted.
Main entry points: edit_session.js Edit Session · editor.js Editor · mouse_handler.js Mouse Handling · folding.js Code Folding
Components 22
Editing Core
- Editor
src/editor.js - Edit Session
src/edit_session.js - Text Document
src/document.js - Selection and Ranges
src/selection.js - Undo Manager
src/undomanager.js - Core Utilities
src/lib
Input and Commands
- Command Manager
src/commands/command_manager.js - Keyboard Bindings
src/keyboard/keybinding.js - Mouse Handling
src/mouse/mouse_handler.js
Language Services
- Background Tokenizer
src/background_tokenizer.js - Language Modes
src/mode - Syntax Workers
lib/ace/mode - Static Highlighting
src/ext/static_highlight.js
Editor Presentation
- Virtual Renderer
src/virtual_renderer.js - Themes
src/theme - Configuration and Loading
src/config.js
Editor Features
- Search and Replace
src/search.js - Code Folding
src/edit_session/folding.js - Autocomplete
src/ext/language_tools.js - Multiple Selections
src/multi_select.js - Clipboard
src/clipboard.js
Other components
- Editor User
Connections 30
- Editor User → Editor: edits in
- Editor → Edit Session: uses session
src/editor.js - Editor → Virtual Renderer: renders through
src/editor.js - Editor → Command Manager: dispatches commands
src/editor.js - Editor → Keyboard Bindings: configures bindings
src/editor.js - Editor → Mouse Handling: handles pointer input
src/editor.js - Editor → Search and Replace: provides search
src/editor.js - Editor → Configuration and Loading: uses configuration
src/config.js - Edit Session → Text Document: manages document
src/edit_session.js - Edit Session → Selection and Ranges: tracks selection
src/edit_session.js - Edit Session → Undo Manager: uses undo manager
src/edit_session.js - Edit Session → Background Tokenizer: uses tokenizer
src/edit_session.js - Edit Session → Language Modes: sets language mode
src/edit_session.js - Edit Session → Code Folding: manages folds
src/edit_session.js - Edit Session → Syntax Workers: starts mode workers
src/edit_session.js - Command Manager → Keyboard Bindings: inherits handlers
src/commands/command_manager.js - Mouse Handling → Selection and Ranges: updates selection
- Mouse Handling → Edit Session: adds drag markers
- Code Folding → Edit Session: reads session
src/edit_session/folding.js - Virtual Renderer → Edit Session: renders session state
- Configuration and Loading → Themes: loads theme modules
src/config.js - Editor User → Themes: chooses theme
- Editor User → Language Modes: chooses language mode
- Editor User → Static Highlighting: views highlighted code
- Editor User → Autocomplete: requests completion
- Editor User → Multiple Selections: uses multiple selections
- Editor User → Clipboard: cuts and pastes
- Editor User → Code Folding: folds code
- Editor User → Search and Replace: searches and replaces
- Edit Session → Core Utilities: uses shared utilities
src/edit_session.js