DhanushNehru / CustomCodeEditor

A web-based tool that allows users to write, test, and execute code in various programming languages seamlessly
https://custom-code-editor.vercel.app/
Apache License 2.0
24 stars 27 forks source link

add a command which would run the code upon pressing ctrl+enter #35

Closed usr-canis closed 4 months ago

vercel[bot] commented 4 months ago

@usr-canis is attempting to deploy a commit to the Dhanush Nehru's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
custom-code-editor ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2024 5:34pm
DhanushNehru commented 4 months ago

@usr-canis please explain and send a screenshot of what you have implemented

usr-canis commented 4 months ago

@usr-canis please explain and send a screenshot of what you have implemented

image

The above code snippet sets up a keyboard shortcut within the Monaco Editor, using the editor.addCommand() method to define a command triggered by pressing Ctrl+Enter or Cmd+Enter. When this shortcut is pressed, it directly invokes the submitCode() function.