How to integrate jupyterlab RTC within an extension?

We have built a Jupyterlab extension for a custom file type (MIME renderer) which provides a SQL code editor leveraging react-codemirror. Now i plan to integrate the jupyterlab colloboration feature RTC for the code editor. And instead of importing the react-codemirror, i was able to refactor to use the jupyterlab’s codeeditor component by doing as below .

import {IEditorServices} from '@jupyterlab/codeeditor';
import {CodeEditor, CodeEditorWrapper} from '@jupyterlab/codeeditor';

 let editorFactory = editorServices.factoryService.newInlineEditor; 
 
let widget = new Widget();
 widget.layout = new PanelLayout();
 
let codehighlighter = new CodeEditorWrapper({
      model: new CodeEditor.Model(),
      factory: editorFactory
  });
  
widget.layout.addWidget(codehighlighter);

Any suggestios for integrating the RTC feature as part of the codeeditor being used within the extension ?

1 Like

Hi @ikiw

Could you share me with full code ? I am interested in developing custom SQL editor for DBT framework .

Thanks
Siva

2 Likes