Answers.Body: <p>That's currently not a native feature in Craft, but you might want to consider voting for this similar <a href="https://github.com/craftcms/cms/issues/898" rel="nofollow noreferrer">feature request</a>.</p>
  
  <p>You could pull it off with a custom plugin in the meantime, too.  Since entry revisions are stored between saves, you'd need to pull that revision data from the database using the <a href="https://craftcms.com/classreference/services/EntryRevisionsService" rel="nofollow noreferrer">EntryRevisionsService</a>, add the business logic for calculating the diffs and come up with a UI for displaying it.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-18T18:04:06.523Z
Answers.LastActivityDate: 2017-04-22T14:45:39.517Z
Answers.LastEditDate: 2017-04-22T14:45:39.517Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>On the frontend, you can use <a href="https://github.com/intoeetive/Diff-for-Craft-CMS" rel="nofollow noreferrer">Diff plugin</a>.</p>
  
  <p>So, this code to fetch versions for entry:</p>
  
  <p><code>{% set versions = craft.entryRevisions.getVersionsByEntryId(entry.id, entry.locale) %}</code></p>
  
  <p>Get specific version:</p>
  
  <p><code>{% set version = craft.entryRevisions.getVersionById(versionId) %}</code></p>
  
  <p>And to compare a specific field:</p>
  
  <p><code>{{ craft.diff.html(entry.title, version.title) }}</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-30T21:44:03.370Z
Answers.Text: Great plugin, thanks for posting. Just worth pointing out that this only compares two strings, so you'd need to loop through each field in use to diff each one. And if you're using matrix/table/Neo fields this could get quite complex and require additional logic.
Answers.UserDisplayName: Simon East
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-19T08:16:13.633Z
Answers.LastActivityDate: 2017-05-01T05:44:19.077Z
Answers.LastEditDate: 2017-05-01T05:44:19.077Z
Answers.UserDisplayName: Yuri Salimovskiy
Body: <p>I'm new to Craft and I'm wondering if Craft is able to display the differences within an entry in different versions.</p>
  
  <p>Comparing 2 versions of the entry and highlighting the changes.</p>
  
  <p>Something similar like most of the mergetools do.</p>
  
  <p>I'm aware that the user can comment the last changes.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-18T16:29:26.763Z
Comments.Text: I had a reason to try and access revision data from a template the other day, but couldn't a way. I'd love to know if this is possible.
Comments.UserDisplayName: Ian Nebbiolo
Tags: <entry><entry-versions>
Title: Comparing 2 versions of an entry and highlighting the changes
ThreadText: # Comparing 2 versions of an entry and highlighting the changes
  
  (Asked by: username_0 on 2016-01-18)
  
  I'm new to Craft and I'm wondering if Craft is able to display the differences within an entry in different versions.
  
  Comparing 2 versions of the entry and highlighting the changes.
  
  Something similar like most of the mergetools do.
  
  I'm aware that the user can comment the last changes.
  
  **Tags:** entry, entry-versions
  
  > **Comments:**
  > **username_1**: I had a reason to try and access revision data from a template the other day, but couldn't a way. I'd love to know if this is possible.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-01-18. Score: 3 | Accepted answer
  
  That's currently not a native feature in Craft, but you might want to consider voting for this similar [feature request](https://github.com/craftcms/cms/issues/898).
  
  You could pull it off with a custom plugin in the meantime, too. Since entry revisions are stored between saves, you'd need to pull that revision data from the database using the [EntryRevisionsService](https://craftcms.com/classreference/services/EntryRevisionsService), add the business logic for calculating the diffs and come up with a UI for displaying it.
  
  
  ---
  
  ### Answer by username_3 on 2017-04-19. Score: 2
  
  On the frontend, you can use [Diff plugin](https://github.com/intoeetive/Diff-for-Craft-CMS).
  
  So, this code to fetch versions for entry:
  
  `{% set versions = craft.entryRevisions.getVersionsByEntryId(entry.id, entry.locale) %}`
  
  Get specific version:
  
  `{% set version = craft.entryRevisions.getVersionById(versionId) %}`
  
  And to compare a specific field:
  
  `{{ craft.diff.html(entry.title, version.title) }}`
  
  > **Comments:**
  > **username_4**: Great plugin, thanks for posting. Just worth pointing out that this only compares two strings, so you'd need to loop through each field in use to diff each one. And if you're using matrix/table/Neo fields this could get quite complex and require additional logic.  
  
  ---
  
  