npm.io
0.0.4-beta • Published 6 years ago

monaco-remote

Licence
MIT
Version
0.0.4-beta
Deps
2
Size
1.1 MB
Vulns
0
Weekly
0
Stars
1

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.

Keywords