Many collaborative editing systems have been developed for coauthoring documents. These systems generally have different infrastructures and support a subset of interactions found in collaborative environments. In this paper, we propose a transactional framework with two advantages. First, the framework is generic as demonstrated by its capability of modeling four types of existing products: RCS, MediaWiki, Google Docs, and Google Wave. Second, the framework can be layered on the top of a modern database management system to reuse its transaction processing capabilities for data consistency control in both centralized and replicated editing systems. We detail the programming interfaces and the synchronization protocol of our transactional framework and demonstrate its usage through concrete examples. We also describe a prototype implementation of this framework over Oracle Berkeley DB High Availability, a replicated transactional database management system.