Hi all,
I'm trying to create an editor plugin for Orion that would allow live (collaborative) editing of a file in Orion. For example if multiple people changing the same file resource I'd like to see live changes in my editor. In other words I'd like to see changes in my editor not after someone saves the resource, but as someone types characters. Suppose i have a messaging server which receives and broadcasts changes to all clients editing the same resource. Looks like i can create a plugin for Orion editor to transmit changes to the messaging server using "orion.edit.model" extension with onModelChanging event. How can I sync back changes from others coming from the messaging server back to my Orion editor? Is this possible with a plugin?
Orion extension plugin that hooks to “orion.edit.model” onModelChanging event only has info about the event ni the editor: text added, number of chars added, number of lines added and same for chars removed. At best, some extensions get editor context object that can give a reference to the contents of the editor via a deferred. Is it possible to gather some additional information not available within the event such as current user, file opened in the editor (file path)? If it’s not available within the ModelChanging event perhaps it might be extracted from somewhere else?
Thanks in advance.
Cheers, Alex |