Simple text-editor component?


#1

I’m hoping to build a simple editor app for ink, the narrative game scripting language that we use internally here at our independent game company, inkle.

I was wondering whether to fork Atom, but for such a simple project, it feels like it would be more trouble than it’s worth to strip such a large app down to its essentials. What I’d prefer is to start with Electron, and add only what I need.

Does anyone know of a simple text-editor component that I could drop in? I realise there are a few web-based ones out there, but perhaps there’s one that would fit Electron well? Would it be easy to extract Atom’s, or does it have tight dependencies on other Atom features? Atom’s may also be too complex for my needs…

It can be really bare bones, although it would be nice if I could eventually add syntax highlighting for our language.

The reason I want to make a new editor rather than a package for Atom/Sublime etc is that I could build the compiler and player directly into the app for non-technical writers, so they have one self-contained app to download and learn with.

Thanks!


#2

You could try using Ace: https://github.com/ajaxorg/ace


#3

Currently, Atom’s TextEditor component has tight dependencies on other Atom features. There has been some work to loosen those dependencies but some work may be too large of a breaking change and will probably have to wait for Atom v2.


#4

yeah atom v2… gonna love it… whenn…??


#5

There are no current plans or timeline for v2.


#6

Thanks, I went ahead and used Ace and it’s working great! Perfect for my needs.