Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@otjs/plaintext

0xTheProDev1.6kMIT0.2.2TypeScript support: included

Operational Transformational Logic for Plain Text.

collaborative, editor, eventual-consistency, operational-transformation, plaintext, typescript

readme

@otjs/plaintext

Sponsor Npm Version Weekly Downloads Minified Zipped Size Types License Dependencies Dependents Vulnerabilities Stars Forks Discussions

Description

Exports Operational Transformation on Plain Text content.

Installation

  • To install using Pnpm (recommended):

    pnpm add @otjs/ace
  • To install using Yarn:

    yarn add @otjs/plaintext
  • To install using Npm:

    npm i @otjs/plaintext --save

Usage

import { PlainTextOperation } from "@otjs/plaintext";

const operation = new PlainTextOperation();

Note: An API documentation will be shipped along with the package. This will power intellisense in the editor of your choice.

Testing

We are using Jest to form our Unit Test Suite. Nyc (formerly known as Istanbul) is used for coverage reporting.

To run all the unit test suites in local dev environment, run the following after dependencies have been installed:

yarn test

Reporting a Bug

Head on to Discussion section to report a bug or to ask for any feature. Use this template to make it structural and helpful for the maintainer and the contributors. Feel to add your queries about using this library as well under Q & A section of it. Remember, do not create any Issues by yourself, maintainers of this repository will open one if deemed necessary.

Changelog

See CHANGELOG for more details on what has been changed in the latest release.

Contributing

See Contributing Guidelines.

License

This project is licensed under the terms of the MIT license, see LICENSE for more details.

changelog

CHANGELOG

v0.2.2

Changed

  • Uniform Event Emitter interface and implementation extended across all event-driven modules. Tracker Work Log

Documentation

  • Changed preferred package manager from yarn to pnpm and updated documentation accordingly. Tracker Work Log

v0.2.1

Security

Peer Dependency

Dev Dependency

v0.2.0

Added

  • Add package @otjs/firebase-plaintext that implements Database Adapter interface for Plain Text Editor using Firebase Realtime Database as source of truth. Tracker Work Log
  • Add package @otjs/ace that implements Editor Adapter interface for Plain Text Editor using Ace Editor instance as presentation. Tracker Work Log
  • Add package @otjs/monaco that implements Editor Adapter interface for Plain Text Editor using Monaco Editor instance as presentation. Tracker Work Log
  • Add package @otjs/firebase-monaco that integrates Firebase and Monaco adapter out of the box to create standalone package ready to be used. Tracker Work Log
  • Add Cursor Widget in Ace Adapter to hightlight User Name beside cursor whenever a change is being made. Tracker Work Log
  • Add Cursor Widget in Monaco Adapter to hightlight User Name beside cursor whenever a change is being made. Tracker Work Log
  • Add Integration Test suite for @otjs/ace. Tracker Work Log

Changed

Fixed

Security

  • Bump tmpl from 1.0.4 to 1.0.5 Work Log

Documentation

v0.1.1

Fixed

  • Enable usage of the library in both Web (Browsers) and Node. Change library.globalObject to use this in Webpack Config. Tracker Work Log

v0.1.0

Added

  • Add package @operational-transformation/plaintext that Handles Trannsformation Logic related to Plain Text content and content changes.
  • Add package @operational-transformation/plaintext-editor that Handles integration between a Plain Text Editor and a Central Server, and keeps contents of all Plain Text Editors associated with the Central Server in sync via Plain Text Operational Transformations.
  • Add package @operational-transformation/state-machine that Handles State Transitions and Side Effects in each stages of Synchronization between Client (e.g., Editor) and Server.