How fouad8080/code-editor works
This is a browser-based code editor for locally selected files and folders. The main workflow is: choose a file or folder, load a file into the CodeMirror editor, save edits through browser file handles, then preview HTML with linked CSS and JavaScript in an iframe. The graph reflects the sampled components and README; browser APIs are shown as external dependencies, and no backend is evidenced.
Main entry points: App.tsx App state and tabs · floders.tsx File and folder browser · CodeShow.tsx CodeMirror editor · proview.tsx Iframe preview
Components 9
App shell
- App state and tabs
src/App.tsx - React mount
src/main.tsx - Top bar
src/component/Upbar.tsx
File workspace
- File and folder browser
src/component/floders.tsx - HTML asset inliner
src/component/tools/buildproviewhtml.tsx
Editing and preview
- CodeMirror editor
src/component/CodeShow.tsx - Iframe preview
src/component/proview.tsx
Other components
- User
- Browser file APIs
Connections 14
- User → File and folder browser: selects files
src/component/floders.tsx - User → CodeMirror editor: edits code
src/component/CodeShow.tsx - React mount → App state and tabs: renders
src/main.tsx - App state and tabs → Top bar: renders
src/App.tsx - App state and tabs → File and folder browser: renders and shares state
src/App.tsx - App state and tabs → CodeMirror editor: renders with state
src/App.tsx - App state and tabs → Iframe preview: renders with preview state
src/App.tsx - File and folder browser → Browser file APIs: picks and reads
src/component/floders.tsx - File and folder browser → HTML asset inliner: builds preview HTML
src/component/floders.tsx - CodeMirror editor → Browser file APIs: writes saved edits
src/component/CodeShow.tsx - CodeMirror editor → HTML asset inliner: rebuilds preview HTML
src/component/CodeShow.tsx - CodeMirror editor → App state and tabs: updates shared file state
src/component/CodeShow.tsx - File and folder browser → App state and tabs: sets selected file state
src/component/floders.tsx - Iframe preview → App state and tabs: reads preview state
src/component/proview.tsx