michmech / xonomy

A schema-driven XML editor for the web.
MIT License
91 stars 32 forks source link

Thanks and question about multiple editors :) #17

Closed Annakan closed 7 years ago

Annakan commented 7 years ago

First a big thanks for Xonomy, it is probably a thankless job and what should be the norm in every editing (schema / semantically guided editing) keeps staying the exception. But Xonomy is an incredible tool to maybe change that and at least enable very interesting applications. (Substance is another approach to the problem for non XML document)

You mention right away in the presentation page of Xonomy that "There Can Only Be One" in a page. Is that a hardcore intractable limitation or just a by-product of the "current state of the API" that could be changed relatively easily ? I am thinking about multiple tabs or on demand editions of snippets of document outside the "main editing zone" but in the same window, or multiple views on the same document as frequent use cases for such a thing. It is probably possible to instantiate editor in particular div on demand but I suspect it is much more difficult than it seems in practice given the state of the editor at the time of the "div/context" switching.

michmech commented 7 years ago

Thank you for your kind words!

The "one only" limitation is just a by-product of my sloppy design and lazy programming. If I ever get to do a substantial rewrite of Xonomy I will make sure to avoid that shortcut.

The usual workaroud is to embed each Xonomy instance in an IFRAME. Your suggestion to create and destroy Xonomy instances on demand would of course work too but, as you rightly say yourself, this would not persist the state of the editor (if by "state" we mean which nodes are expanded/collapsed and so on).