Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

miclle/monaco-remote

Repository files navigation

monaco-remote

Monaco Editor with remote collaboration.

NPM version Downloads

monaco-remote

demo graphic

Installation

yarn add monaco-remote

Using

Realtime messaging interface definition

interface IMessage {
  uid?: string;
  message: Uint8Array;
  timestamp?: number;
}

interface IMessageChannel {
  sendMessage(message: IMessage): Promise<void>;
  onReceiver(listener: (message: IMessage) => any): void;
  onMemberJoined(listener: (memberId: string) => any): void;
  onMemberLeft(listener: (memberId: string) => any): void;
}

Monaco editor content manager options

interface IEditorContentManagerOptions {
  editor: editor.IStandaloneCodeEditor;
  channel: IMessageChannel;
}
new EditorContentManager({ editor, channel })

License

MIT, see the LICENSE file for detail.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published