Using knockout.js in editor plugin


#1

I’ve been looking at packaging a project of mine, Gorilla REPL, as an atom plugin. It currently has its own editor component, which is implemented using knockout.js. As a test, I’ve been experimenting with making a simple editor plugin that uses knockout.js and I can’t get it to work!

I’ve succeeded in defining my own editor which is activated for a particular file type, and I can include knockout in my view’s code, and bind it to one of the view DOM elements. But … nothing seems to actually happen, that is to say, knockout does not seem to be making any changes to the DOM.

Does anyone have any experience with using knockout within a plugin (I couldn’t find anything searching), or understand perhaps whether it should or shouldn’t be possible?

Thanks in advance,

Jony


#2

I understand wanting to reuse the code you already have, but I feel like your post begs the question: Given there are already two View systems in use in Atom to my understanding (Space Pen and React), is it wise to attempt to insert a third?


#3

You’re probably right that it’s not wise. I try to not let that stop me though :slight_smile:

It would be better not to have to rewrite the core of Gorilla, if possible, and as it is used outside of atom (i.e. standalone) any solution would ideally be not specific to atom.

Maybe another way to look at is, given there are already two view systems, it probably wouldn’t be too bad having a third!