How mugiwara85/codeblockcustomizer works
Codeblock Customizer is an Obsidian plugin that applies configurable code-block and inline-code presentation in both editor and reading views. The main user workflow is to configure styling and behavior, write Markdown code blocks with optional parameters, and view the customized output. Its domain stages include parameter parsing, editor decorations, reading-view rendering, and specialized features such as prompts and grouped blocks. The graph also shows settings and shared rendering utilities. Some subsystem paths are supported by the tree and README, but their internal wiring was not sampled, so uncertain links are omitted.
Main entry points: main.ts Plugin runtime · Parsing.ts Parameter parser · CodeBlockRenderer.ts Reading renderer · CodeBlockPositions.ts Block positions
Components 22
Plugin entry
- Plugin runtime
src/main.ts
Parsing and state
- Parameter parser
src/Parsing.ts - Block positions
src/EditorView/CodeBlockPositions.ts - Shared utilities
src/Utils.ts - Language and style constants
src/Const.ts
Code presentation
- Editor decorations
src/EditorView/MainViewPlugin.ts - Reading renderer
src/ReadingView/CodeBlockRenderer.ts - Reading post-processors
src/ReadingView/PostProcessors.ts - Inline code
src/ReadingView/InlineCodeRenderer.ts - View utilities
src/ReadingView/ReadingViewUtils.ts
Customization features
- Tabbed code groups
src/ReadingView/GroupedCodeBlockRenderer.ts - Editor code groups
src/EditorView/GroupedCodeBlocks.ts - Code folding
src/EditorView/Folding.ts - Terminal prompts
src/PromptManager.ts - Highlight rules
src/HighlightRules.ts - HTML code blocks
src/HtmlCodeBlocks.ts - Code execution integration
src/ExecuteCode.ts
Settings
- Plugin settings
src/Settings.ts - Settings interface
src/SettingsTab/SettingsTab.ts - Syntax theme defaults
src/SyntaxThemeDefaults.ts
Other components
- Obsidian user
- Markdown code
Connections 29
- Obsidian user → Plugin runtime: uses
README.md - Obsidian user → Markdown code: authors
README.md - Markdown code → Parameter parser: sets parameters
README.md - Plugin runtime → Editor decorations: registers extensions
src/main.ts - Plugin runtime → Settings interface: registers settings
src/main.ts - Plugin runtime → Syntax theme defaults: loads defaults
src/main.ts - Plugin runtime → Block positions: imports
src/main.ts - Block positions → Parameter parser: parses blocks
src/EditorView/CodeBlockPositions.ts - Block positions → HTML code blocks: finds HTML blocks
src/EditorView/CodeBlockPositions.ts - Editor decorations → Parameter parser: uses parameters
src/EditorView/MainViewPlugin.ts - Editor decorations → Terminal prompts: uses prompts
src/EditorView/MainViewPlugin.ts - Editor decorations → Highlight rules: uses rules
src/EditorView/MainViewPlugin.ts - Plugin runtime → Reading renderer: registers renderer
src/main.ts - Plugin runtime → Tabbed code groups: registers renderer
src/main.ts - Plugin runtime → Inline code: registers renderer
src/main.ts - Plugin runtime → Reading post-processors: registers processors
src/main.ts - Reading renderer → View utilities: uses utilities
src/ReadingView/CodeBlockRenderer.ts - Reading renderer → Parameter parser: uses parameters
src/ReadingView/CodeBlockRenderer.ts - Reading renderer → Shared utilities: loads Prism
src/ReadingView/CodeBlockRenderer.ts - Reading post-processors → Reading renderer: uses renderer
src/ReadingView/PostProcessors.ts - Inline code → Parameter parser: parses inline parameters
src/ReadingView/InlineCodeRenderer.ts - Inline code → Highlight rules: uses rules
src/ReadingView/InlineCodeRenderer.ts - Settings interface → Plugin settings: edits settings
src/SettingsTab/SettingsTab.ts - Settings interface → Syntax theme defaults: uses defaults
- Parameter parser → Terminal prompts: resolves prompt definitions
src/Parsing.ts - Parameter parser → HTML code blocks: converts HTML fences
src/Parsing.ts - Editor code groups → Block positions: uses positions
src/EditorView/GroupedCodeBlocks.ts - Code folding → Block positions: uses positions
src/EditorView/Folding.ts - Code execution integration → Parameter parser: uses parameters
src/ExecuteCode.ts