Closed fprijate closed 7 years ago
Thanks for the idea, I can definitely see where you're coming from.
If you're thinking about using cell with an existing DOM, I think you can easily achieve what you're looking for by using jQuery (via its appendTo, insertAfter, etc. methods) or even native DOM APIs like insertBefore, etc.) since Cell creates native HTML nodes. (If you're plugging Cell into an existing website, you're probably using jQuery anyway, and even if you're not using jQuery you can use vanilla javascript to move them around easily)
Since Cell's design goal is to be as minimal and abstract as possible, and since these features can be achieved with other means I don't think we need to implement this feature. I'll close this for now, but please feel free to reopen or leave a comment for further discussion. Thanks!
Thanks for your answer
Thanks for the idea, I can definitely see where you're coming from.
No. My primary intention is not to use cell as tool for minor modifications of existing HTML. I have following in my mind. Server sends me JSON and Cell renders it into existing DOM , which was previously rendered by cell. In this case we should have factory method to do this. Byproduct of this is also possibility of inserting cell's into existing static HTML. Both insertions should be possible in previously discussed positions.
Also it would be nice if somebody (or group of us) make a converter from static HTML to cell's JSON.
It would be nice if I could specify that $cell :
Maybe by extending $cell values:
where v can be
It would be very useful when inserting some new content into existing static html pages.