Search code examples
syntax-highlightingcollaborationetherpad

How to turn on syntax highlighting in etherpad


There are many free etherpad implementations since it went open source. Does etherpad support syntax highlighting or is some kind of add-on available?

I tried http://typewith.me/ http://sync.in/ http://www.piratenpad.de/


Solution

  • UPDATE: Syntax highlighting is available as a plugin in the current Etherpad -- see John's answer below.

    The original etherpad creators were working on highlighting, but complex sync-problems made them abandon that feature -- as documented in a .txt file in the source code.

    Many etherpad sites run on a mostly standard etherpad.org release. If highlighting would get added, you'd probably see it quickly adopted at sketchpad.cc. Perhaps watch them and wait? Or if you really want highlighting, a good first attempt/experiment would be the read-only view. Example: http://sketchpad.cc/sp/pad/view/BACfNDybki/latest Try to use some existing highlighting javascript library to highlight the text inside DIV#padcontent or perhaps $('DIV#padcontent')[0].textContent

    The complexity is getting the highlighted text formatting back into the DB. For this you might need to use operational transformations (which is the foundations of etherpad and as of recently also used in the Google Docs word processor). A tutorial: http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation