Bottom-up Editing In Tree Structures

I'm going to show how to make constrained tree structure editing to feel as if editing a flat sequence of cells. This is something I had to figure out for textended.

To derive the operations, I had to first figure out editing for a flat sequence of cells. To figure it out I actually implemented a flat document model and set of editing operations to modify it. Such editor can be composed from four primitive operations which I named by their function:

In a flat document model Collapse-Put and Join-Split are symmetric operations. The editing remains fairly similar to editing in a plaintext editor. The same set of operations can be implemented in a tree structure. In summary, reasonable amount of structures are destroyed so the exact same operations can be done without violating constraints. To minimize damage the operations are allowed to wrap tokens into 'placeholder' structures.

I have implemented some of the behavior into the editor, and found it promising this far. More accurate description of implementation can be eventually found in the specification of the editor.

Similar posts