madebymany/sir-trevor-js

Remove dependency on form

raffij opened this issue · 5 comments

More people are using Sir Trevor in a single page environment.

Make it easier to deal with data both input / output.

Make a form the default option, but easy to not require it.

👍

So would that mean that you write/read from a standard Div in that instance then? (just trying to check what I think is happening in my head correctly).

Yeah — though it'd likely be configurable. This should just make it easier to use in different situations.

I can foresee problems relating to fun and games with the DOM though (namely if you've got an element thats not been added to the DOM yet but attempt to use Sir Trev on it... then again that shouldn't be really be a problem the more I think about it, since you can apply all sorts of changes before submitting so this shouldn't be an issue either so long as it's correctly handled if there's the chance of multiple instances being created and then hogging the memory).

@SgtOddball it would be either a textarea, or you could use sirtrevor with json data in js.

This goes hand in hand with a new data api that will make it easier to load and save the current state of the editor.

In your instance you'd not see any changes, but for people that wanted to create sirtrevor instances in react or angular it would make it easier.