Sometimes you make some changes to a draft, and realize you want to backup and restore some or all of a previous version of the draft. Drafts keeps version history you can restore from, but sometimes it’s nice to have additional tools to compare changes and merge them into the active version of the draft.
The Diff Versions is designed to fill that need. It incorporates the web-based diffing too Mergely into a Drafts action, giving you a side-by-side comparison of changes between the current text of the draft and any versions in the version history.
NOTE: This action works best on the Mac. It can also be used on iPad, but it is recommended you have a trackpad or other more precise pointing tool, rather than touch, due to the size of the controls provided by the Mergely library used for the action.
To use the action:
- Install the Diff Versions action from the Directory.
- Open a draft with multiple edits and at least one version in the version history in the editor.
- Run the Diff Versions action from the action list.
Once open, the display will default to the current text of the draft on the left column, and the most recent previous version on the right. Any differences between the two texts will be highlighted as additions and deletions. Change from either side can be merged back and forth with the arrows in the margins.
You can select other past versions in the drop-down lists at the top to find the one you wish to compare.
When you finish with any desired changes, you can update the text of the draft to one of the merged texts using either the “Save Left” or “Save Right” button, or simply exit with “Discard Changes”.
Drafts’ advanced HTML Preview features allow a variety of web-based tools to be incorporated into your actions, passing information back and forth to the web tool. This example action utilizes an existing web diffing tool (Mergely) to provide it’s services directly within Drafts.