Skip to content

Example code how to integrate Monaco editor with Angular within an electron application.

License

Notifications You must be signed in to change notification settings

fricci/electron-with-angular-and-monaco-editor

Repository files navigation

Angular Logo Electron Logo #Monaco Editor

Introduction

This is an integration example to use Monaco editor in Electron app that uses Angular framework.

The following projects have been used:

Details

I made the following modification on orignal code:

  • Teradata's original wrapper are able to used in non-electron environment. This code is removed, because I focused to Electron
  • Because this boilerplate uses Angular CLI, I had to make some modification in MonacoEditorWrapperComponent constructor, to determine the proper application path
  • The wrapper uses the Monaco editor that is in the node_modules, musn't copy the assets directory

Main parts

  • /src/electron-load.js
  • this script is loaded by angular.json
  • /src/component/monaco-wrapper

Run, Build, etc

copy-pasted from original boilerplate:

Command Description
npm run ng:serve:web Execute the app in the browser
npm run build Build the app. Your built files are in the /dist folder.
npm run build:prod Build the app with Angular aot. Your built files are in the /dist folder.
npm run electron:local Builds your application and start electron
npm run electron:linux Builds your application and creates an app consumable on linux system
npm run electron:windows On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems
npm run electron:mac On a MAC OS, builds your application and generates a .app file of your application that can be run on Mac

Contributors

About

Example code how to integrate Monaco editor with Angular within an electron application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published