
Ask HN: JavaScript based editor with predefined grammar - 100-xyz
Hi,<p>I am creating a Flash replacement - a web based animation editor.  https:&#x2F;&#x2F;its-near.me&#x2F;flash2&#x2F;editor<p>The animation will be controlled by simple text like:<p>At time 0 cowboy walks to point A.<p>Then cowboy jumps.<p>Then cowboy walks to point C.<p>The grammar is predefined: [time] [object] [verb] [?subject]<p>Where time can be &quot;At time XX&quot; or &quot;Then&quot;<p>object can be any of the images in the animation<p>verb can be any of the movements that the image sprite supports eg: &quot;walk&quot;, &quot;run&quot;, &quot;slide&quot;, &quot;die&quot;<p>and so on.<p>The editor should prompt the possible values that the user can enter.  eg: in the beginning, the choices would be &quot;At time&quot; and &quot;Then&quot;<p>I have searched online and in particular github with no luck.  Anyone here know of any?<p>Hopefully, I have explained clearly.  If not, please ask for clarification.<p>Thanks.
======
Yotta
Take a look at Codemirror
([https://codemirror.net/](https://codemirror.net/)). It has support for
autocompletion, although I haven't tested this myself.

You can also define syntax highlighting for your grammar.

------
sprobertson
Customization around Draft.js should support this, tricky to learn but quite
powerful once you do.

