@otjs/monaco
Version:
Plain Text Editor Adapter for Monaco Editor.
81 lines (52 loc) • 4.31 kB
Markdown
# `@otjs/monaco`
[](https://github.com/sponsors/0xTheProDev)
[](https://www.npmjs.com/package/@otjs/monaco)
[](https://www.npmjs.com/package/@otjs/monaco)
[](https://www.npmjs.com/package/@otjs/monaco)
[](https://www.npmjs.com/package/@otjs/monaco)
[](https://github.com/0xTheProDev/Operational-Transformation/blob/main/packages/monaco/LICENSE)
[](https://www.npmjs.com/package/@otjs/monaco)
[](https://www.npmjs.com/package/@otjs/monaco)
[](https://github.com/0xTheProDev/Operational-Transformation/blob/main/.github/SECURITY.md)
[](https://github.com/0xTheProDev/Operational-Transformation/stargazers)
[](https://github.com/0xTheProDev/Operational-Transformation/network/members)
[](https://github.com/0xTheProDev/Operational-Transformation/discussions)
## Description
> Editor Adapter implementation for Monaco.
## Installation
- To install using [Pnpm](https://pnpm.io) _(recommended)_:
```sh
pnpm add @otjs/ace
```
- To install using [Yarn](https://yarnpkg.com):
```sh
yarn add @otjs/monaco
```
- To install using [Npm](https://www.npmjs.com):
```sh
npm i @otjs/monaco --save
```
### Peer Dependencies
Make sure to install all the peer dependencies beforehand:
[](https://microsoft.github.io/monaco-editor)
## Usage
---
```ts
import { MonacoAdapter } from "@otjs/monaco";
const monacoAdapter = new MonacoAdapter({
editor: // Monaco Editor Instance
announcementDuration: // Duration (in ms) of User Name Announcement beside Cursor (optional)
bindEvents: // Boolean on whether or not to emit events from Adapter (optional)
});
```
**Note**: An API documentation will be shipped along with the package. This will power intellisense in the editor of your choice.
## Testing
We don't have any Unit Test Suite for `@otjs/monaco`. Please refer to root [README](https://github.com/0xTheProDev/Operational-Transformation/blob/main/README.md) for details regarding Integration Test Suite that concerns monaco.
## Reporting a Bug
Head on to [**Discussion**](https://github.com/0xTheProDev/Operational-Transformation/discussions) section to report a bug or to ask for any feature. Use this [template](https://github.com/0xTheProDev/Operational-Transformation/discussions/30) 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](https://github.com/0xTheProDev/Operational-Transformation/blob/main/CHANGELOG.md) for more details on what has been changed in the latest release.
## Contributing
See [Contributing Guidelines](https://github.com/0xTheProDev/Operational-Transformation/blob/main/.github/CONTRIBUTING.md).
## License
This project is licensed under the terms of the MIT license, see [LICENSE](https://github.com/0xTheProDev/Operational-Transformation/blob/main/packages/monaco/LICENSE) for more details.