Skip to Main Content
Menu
Close Menu
Screenshot of the EditTogether interface

EditTogether

Collaborative Communication in Real-Time

Bringing content workflows into the 21st century

Our client is a division of a state agency that serves residents in need of Medicaid services. ​​The team members within this division draft, edit, approve, and publish benefit enrollment content, however, their workflow presented many issues. It was a complex, lengthy, manual process that relied on multiple proprietary platforms, and was described by internal stakeholders as “20th century”. Palantir wholeheartedly took on this challenge and was able to produce an open source collaborative editing tool for Drupal, EditTogether.

Finding a way to create, manage, and publish – all in one place

Our client was limited by a burdensome content lifecycle that relied heavily on SharePoint and Word’s real-time collaboration features, and which felt jagged and archaic to the team.

  • Editing, versioning and publishing was high-friction and inefficient since the process was fully manual. This workflow created a high administrative burden spread across multiple systems — Microsoft Word, Adobe RoboHelp, SharePoint — and relied on hundreds of human hours. This was very costly on its own, without taking licensing fees into account.
  • Opportunities for error were introduced with each manual transition. Editors and subject matter experts relied on multiple systems and meetings to get each step right and ensure content accuracy, redirecting their focus away from other high-value tasks.
  • The team lacked meaningful insight into end users' usage because their current system was not sufficiently transparent. The team did not know if the high amount of effort they put in was actually having the intended impact.
  • It was difficult to support new content, as any new handbooks or manuals compromised the workflow speed. Collaborating with new teams, subject matter experts, and outside agencies was especially burdensome. The platform could not expand for multimedia, accessibility, and content sharing, and the team couldn’t add new functionality across documents because not all functionality is available for all content.

Our client wanted to create, manage, and publish their content all in one place via an extensible, adjustable system that could adapt to their needs. They wanted a more sustainable system for content development that would reduce the number of platforms being used, the manual handoffs present in their current workflow, and the vendor lock-in and ongoing licensing fees they faced.

Creating EditTogether

Palantir began investigating solutions, but options like Microsoft Office 365 or CKEditor 5 didn’t satisfy them. Using Microsoft 365 meant the team couldn’t bring the entire workflow into Drupal, limiting collaborative editing functionality, and CKEditor 5’s client-server model was a security no-go because it sent their data into an unapproved cloud environment. Stuck between not having a full Drupal workflow and this security limitation, Palantir reached for an alternative solution, creating the EditTogether tool. This process took over a year and was powered by a dedicated team of Palantir developers, technical architects, strategists, a designer, a product owner, and a team lead. 

A configurable plug-in system via the Drupal Text Editor API 

Palantir’s team tackled the client’s challenges one by one. They started off by attaching EditTogether’s rich text editor to Drupal via the Drupal Text Editor API. They did this because Drupal’s Text Editor API provides a plug-in system to not only add new text editors, but also a config entity for configuring them. “That config entity is what eventually becomes the text formats that you see in Drupal, like your Basic HTML, Restricted HTML, Full HTML, etc.,” says Palantir’s Senior Engineer, Alex Jones.

Flexible rich text editors built using ProseMirror 

Next, the team turned to ProseMirror, a flexible toolkit for building rich text editors. ProseMirror enabled the team to instantiate configurable text editors and configure them for specific contexts and content types. “This way you can have text editors with very limited options or a plethora of options, and you can configure them dynamically,” says Alex.

Syncing data with Yjs

To get the collaboration side of things working with ProseMirror, the team used Yjs, a shared editing framework in JavaScript that syncs common data structures. “It can sync hashmaps, arrays, and XML content, but it'll do it in real-time, collaboratively with other people,” says Alex. 

Form-level collaboration from ProseMirror and Yjs combined 

Hooking Yjs up to ProseMirror and syncing ProseMirror’s state between multiple users gave the team the ability to see cursor positions with fellow content editors and actually edit in real-time. Connecting the two also provides a Yjs document that allows users to insert multiple fields into a single collaborative session. “Theoretically, you can have an unlimited amount of fields tracked collaboratively in your document at one time,” says Alex. By providing flexible editor instances, a data structure for managing content, and an ability to sync data structures in real-time, ProseMirror and Yjs together led to the end goal: form-element-level collaboration. “Using them together allows us to extend collaboration from beyond just the body field to the form element level and actually have collaboration across every form element,” says Alex.

Reliable, secure, and affordable real-time connection via WebRTC 

When it came time to actually connect users in real-time, the team had some barriers to overcome. The team looked into two communication model options for RT collaboration, client-server or peer-to-peer.

The team explored WebRTC’s reliability as a peer-to-peer model. WebRTC’s sole purpose is to connect clients with other clients, making it highly dependable for video calls, message services, and general data transfer, a point in its favor.

Security considerations also had to be taken into account during development, since, as with many government agencies, our client had strict limitations on where content can be hosted. The team again leaned toward WebRTC, since the site’s content state is only exposed to collaborators. “Your content never leaves the stewardship of the people who can already access your site,” says Alex. “For security reasons, that's much more preferable for us than WebSocket because there isn't a third party that can view your content.”

Finally, hosting through WebRTC means significantly lower costs than via client-server models. “All of the intensive CPU power that's required for the WebSocket model is actually deferred to each client machine when you're editing via WebRTC. Because the client machines are actually responsible for managing the state of the document, WebRTC is orders of magnitude cheaper than WebSocket,” says Alex. 

Granular control and real-time collaboration

After over 13 months of work, The Palantir team delivered a real-time collaboration framework for Drupal 10 and 11 with many exciting improvements to the old system.

  • Real-time collaboration in content editing. This functionality allowed for the creation of workflows and processes based on the most recent updates, while also eliminating the need to develop content outside Drupal.
  • New plug-in system. The plug-ins enabled granular control over all aspects of EditTogether. Developers could extend EditTogether using custom modules, with extensions including toolbar buttons and functionality, ProseMirror plug-ins (cursors, history, etc.), and major features like collaboration at the form level with commenting inline suggestions and change tracking.
  • Auto-saving and Yjs document revisions. Auto-saving in real-time is based on a timeout that the user sets. The Yjs documents are then stored in fields attached to each collaborative entity. Auto-saving occurs independently from saving a node and is continually updated against a forward revision until the node is saved. The Yjs documents provide a granular change history between Drupal revisions, including what the change was, when it happened, and who changed it.
  • Real-time collaboration at the form element level. Binding Yjs to form elements using Javascript behaviors offered control over collaboration at the element level, allowed core and custom fields to use collaboration, and enabled collaboration to be expanded to any form. “When we target that form element level, it means anywhere that the form element shows up in Drupal, we can sync it collaboratively and in real-time,” explains Alex.  
  • WebRTC infrastructure and hosting options. EditTogether can be connected to a variety of different managed services using the plug-in system, including the default signaling server (packaged with Yjs) and Azure Web PubSub.
  • Increased data sovereignty. WebRTC ensures that content is only shared between collaborators, not third parties, offering collaboration for security-conscious organizations where client-server models aren’t an option.
  • A modular and extensible Rich Text Editor. Media library and Entity browser support are embedded in the text editor itself.
  • Easy integrations. The new system was primed to integrate with Drupal content moderation workflows and user access controls.
  • Basic WYSIWYG. A variety of options include Bold, Italic, Strikethrough, Ordered List, Unordered List, Indent, Outdent, Superscript, Subscript, Link, Blockquote, Code, Tables, Heading selection, Undo, Redo, Remove formatting, Align Left, Align Right, and Align Center.
     
Screenshot of EditTogether showing multiple field collaboration and comments

A jubilant breakthrough

The team’s first iteration of real-time collaboration was a high point of the project. “Two of our engineers were able to edit the same piece of content at the same time and see each other live in the system. Reaching this milestone, in relatively little time, was a huge win in and of itself,” says Tanya Nascimento, Palantir’s Program Manager. At the next all-company meeting, the team enthusiastically shared the tool so all of Palantir could try it out. Having upwards of 30-40 people collaborate at the same time helped the team test the impact on the server, allowed any UI issues to surface, and prompted fellow Palantiri to provide feedback and suggestions. “It was a time filled with possibility and excitement around how we could make this even better,” says Tanya. 

Benefits for our clients, their teams, and the entire Drupal community

Consolidated content workflows

EditTogether lessens administrative burdens by minimizing the handoffs between editors, reviewers, and approvers. Creating and editing content becomes more efficient, reducing workload and shortening the timeline to publication. This has the added benefit of providing the public with important information sooner and with a lessened risk of human error affecting the end product.

A collaborative, open source solution for many 

Many of Palantir’s implementations on this project, like collaborative editing, bring increased functionality to the entire platform, so other stakeholders can benefit too. EditTogether is also a massive contribution to the Drupal community in general,  establishing Drupal as the first open source CMS to offer real-time collaboration, while also providing a truly open source option for Drupal’s TextEditor API. Because it's built on open source software, Palantir is excited to see how EditTogether can continue to grow and be sustained by the community. “We were thrilled to be the group to create this functionality and eager to work out the technical strategy on how to approach it,” says Tanya.

Cutting fees, consistent branding, and offering extensibility

Moving away from proprietary solutions will enable our client to cut licensing fees out of their overall costs. EditTogether’s plug-in architecture means developers can extend it with custom modules, enabling rapid deployment of features, a lower barrier to entry for module contributions, and collaboration expansion to other form elements.
 

Screenshot of the EditTogther collaborative editing interface

Help us support EditTogether

The bulk of the work is over, and Palantir is currently working on preparing EditTogether for public release. Palantir Founder and Co-CEO George DeMet says, “We built this tool around one client's use case, and we're really looking to validate and get support for other use cases. We also want to focus on documentation, both developer and user, so that once we release this project to the public, people can jump in quickly.”

Learn more about EditTogether at EditTogether.com.

Cartoon image of a dinosaur and a unicorn with a rainbow in the background with the words Edit Together in the foreground, surrounded by the words "edit", and the Palantir.net logo and wordmark

Let’s work together.

Have an exceptional idea? Let's talk and see how we can help.

Contact Us