kratsg / captionator

Allow the user to press keys in order to move on to the next set of dialogue in a browser.
GNU General Public License v3.0
0 stars 1 forks source link

Create YAML schema and Linter for ACE editor #6

Open kratsg opened 8 years ago

kratsg commented 8 years ago

This should help make sure that what is being written is a valid format. Can also help catch if a given document does not match the schema [if it doesn't, we can turn off file syncing until it matches again!]

kratsg commented 8 years ago

Use a JSON Schema, load that in, and use the fastest javascript validator (https://github.com/epoberezkin/ajv) to validate it for us. This can be fed back into Ace using custom hooks and so forth (maybe just simply fed through the linter's webworker somehow)

Pick one of these two to take the yaml and load an instance object from it

To Do:

If linter doesn't work, CodeMirror seems to have better support here. Otherwise, roll your own damn solution.

kratsg commented 8 years ago

https://ace.c9.io/#nav=howto