Search code examples
ruby-on-railsversioninghighlighting

Rails wiki highlight/strikethrough version differences between article versions


I'm wondering how to implement highlighting of changes to user edited articles on a wiki style rails project. Since articles may be fairly lengthy I'd ideally like strikethrough and highlighting, similar to github and wikipedia for example. Despite searching around the net I've not really come up with much, apart from instiki which is a complete wiki application.

Thanks in advance for any advice.


Solution

  • To implement in Rails, you should use the a version management gem such as vestal version. Ryan Bates did an excellent screen-cast on the subject. Once you get the versioning of articles, you will want to use the html-diff (or a similar library) to do the html output.