agmcleod
agmcleod

Reputation: 13621

Tracking changes to plain text - rails, jquery

I have a Rails application that's used for taking written copy from word documents, saving them as plain text, and then compiling them together to go into our CMS. This works nicely.

However, what I want to start building on, is the ability to actually go through the draft, review and edit process as well. I have an idea on how people can make comments on what needs to be changed, so I'm not concerned there. However, when someone actually makes the edits, I would like to track them somehow like it does in MS word. I really have no ideas on where to start. I'm not sure if there's a good difference library out there, such as porting whatever Vim diff uses, or if I should roll my own solution for this.

Any recommendations of good tools, gems, etc are greatly appreciated. Feel free to comment if you don't understand my question, or need more details.

Upvotes: 1

Views: 154

Answers (1)

agmcleod
agmcleod

Reputation: 13621

Did some searching, and actually found a handy gem that does exactly what i want called differ. As you can see on the readme page there it takes a few output options including html, and it shows either the character, word or line difference between two strings.

Upvotes: 1

Related Questions