feat: add executable code blocks with 15+ programming languages#13
Merged
rui-typelets merged 2 commits intomainfrom Sep 20, 2025
Merged
feat: add executable code blocks with 15+ programming languages#13rui-typelets merged 2 commits intomainfrom
rui-typelets merged 2 commits intomainfrom
Conversation
- Add Monaco Editor integration with VS Code experience - Support JavaScript, TypeScript, Python, Java, C++, C#, Go, Rust, PHP, Ruby, Kotlin, Swift, Bash, SQL - Implement secure backend proxy for Judge0 API (no client-side API keys) - Add real-time status updates during code execution - Support per-block theme customization (light/dark) - Add resizable code blocks with drag handles - Integrate with TipTap editor via custom NodeView extension - Add toolbar button and slash command support
…nd secure backend proxy
Contributor
|
🎉 This PR is included in version 1.18.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Transform Typelets into an interactive coding environment! This PR adds executable code blocks that support 15+ programming languages, allowing users to write, edit, and
execute code directly within their notes.
Features Added
💻 Code Execution
Ctrl+Enter🎨 Professional Editor Experience
🔧 Editor Integration
/executableor/codeto insert📱 Responsive Design Fixes
Technical Implementation
Architecture
ExecutableCodeBlocknode typeExecutableCodeBlockNodeViewcomponent with MonacoCodeExecutionServicewith authentication and error handlingSecurity
Performance
Files Changed
New Files
src/services/codeExecutionService.ts- Core execution servicesrc/components/editor/extensions/ExecutableCodeBlock.ts- TipTap extensionsrc/components/editor/extensions/ExecutableCodeBlockNodeView.tsx- React componentassets/execute-code-demo.gif- Feature demonstrationModified Files
src/App.tsx- Authentication setup for code execution servicesrc/components/editor/Editor/Toolbar.tsx- Added executable code block buttonsrc/components/editor/config/editor-config.ts- Registered new extensionsrc/components/editor/extensions/SlashCommands.tsx- Added slash commandsrc/components/folders/index.tsx- Responsive layout fixessrc/components/layout/DesktopLayout.tsx- Overflow and flex improvementssrc/components/notes/NotesPanel/index.tsx- Panel width constraintsREADME.md- Comprehensive documentation updatepackage.json- Added Monaco Editor dependenciesDependencies Added
@monaco-editor/react- React wrapper for Monaco Editormonaco-editor- VS Code editor engineBreaking Changes
None - fully backward compatible with existing notes.
Testing
Migration Notes
No migration required. Existing notes remain unchanged. New executable code blocks can be added via toolbar or slash commands.
Usage
Creating Executable Code Blocks
/executableor/codeExecuting Code
Ctrl+EnterCustomization