Search code examples
angularjsf#web-controls

F# TextEditor control for web


I'm looking for a control I could integrate to my angular web application to let my users edit some F# code.

For now they just modify it through a regular text area. The F# code is then saved in a database field and is compiled and executed by another external process.

But I'm looking for something providing keywords formatting and maybe intellisense.

There is no need to run the F# code, just a nice editor.

Thanks

Dan


Solution

  • As far as I know, there are two open source projects you can use:

    • FSharpWebIntellisense provides an integration for the Ace editor and for CodeMirror. It is an older project that has been the core for the F# support for IPython Notebook and I also used it in a couple of project including fun3d.net. For Fun3D, I modified it a bit (made it simpler with Suave backend), so you might want to use this version instead. I tried turning this into a stand-alone repo which can be referenced via Paket as shown in a demo.

    • Ionide Web is a new work-in-progress project that brings Ionide (F# support for VS Code) to the web. This is based on the Monaco editor (by Microsoft) which is powering VS Code. I expect there will be more activity here in the near future.