You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I am returning to exploring substance has great basis for an online / collaborative editor.
I understand that you use the term "schema" in a very loose sense meaning more "collection of node types that can appear in a document" thane "structure of the document tree".
Is is possible (or do you think is is possible to implement ) a more "structured document schema" approach where some node can only appear in the context of some other nodes.
In a naive way this could be implemented by a test function canAppear(Parent_node_context) and/or a function allowedSubnodes()=>list of allowed subnodes types:.
The goal is to allow editing "strongly structured" documents where edition is guided by a schema, allowing for instance to have code-editor like shortcuts CTRL+space who display a contextual menu of the allowed sub nodes before continuing edition in place.
All of this subnodes would not have a "visual" effect (bold, etc, ) but could have a visual indication. For instance a node could be "law reference" (underlined in yellow) or "actor reference" (underlined in blue) displaying a law book name and position in it, or a the full tittle of a person, while storing a reference to an UUID to it ... etc ...
Maybe I missed this already or maybe substance is lower level and this needs to be build on it ...
Thanks a lot for your time.
The text was updated successfully, but these errors were encountered:
Annakan
changed the title
Does or Can Substance support a "true" concept of "schema" for documents ?
Does or Can Substance support a "strict" concept of "schema" for documents ?
Sep 10, 2017
Hey @Annakan
This is actually a tough problem which we are also experimenting with in the course of developing Texture (https://github.com/substance/texture).
Our approach is using an XML data schema, providing on-the-fly validation, but also real-time enabling/inhibition of UI elements according to the schema.
As you noticed, in the current version of substance this is not built-in -- this is our major goal for substance 2.0 (while 1.0 is not out yet ;) )
So, there is hope, but ATM it is still experimental. You could take a look at our latest development in Texture.
All models and converters are generated automatically.
Of course, the UI still needs to be implemented manually.
As you presumed, this is all built on top of the low-level API.
Hello
I am returning to exploring substance has great basis for an online / collaborative editor.
I understand that you use the term "schema" in a very loose sense meaning more "collection of node types that can appear in a document" thane "structure of the document tree".
Is is possible (or do you think is is possible to implement ) a more "structured document schema" approach where some node can only appear in the context of some other nodes.
In a naive way this could be implemented by a test function
canAppear(Parent_node_context)
and/or a functionallowedSubnodes()=>list of allowed subnodes types:
.The goal is to allow editing "strongly structured" documents where edition is guided by a schema, allowing for instance to have code-editor like shortcuts
CTRL+space
who display a contextual menu of the allowed sub nodes before continuing edition in place.All of this subnodes would not have a "visual" effect (bold, etc, ) but could have a visual indication. For instance a node could be "law reference" (underlined in yellow) or "actor reference" (underlined in blue) displaying a law book name and position in it, or a the full tittle of a person, while storing a reference to an UUID to it ... etc ...
Maybe I missed this already or maybe substance is lower level and this needs to be build on it ...
Thanks a lot for your time.
The text was updated successfully, but these errors were encountered: