index.ts 950 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) Jupyter Development Team.
  2. // Distributed under the terms of the Modified BSD License.
  3. import { IEditorServices } from '@jupyterlab/codeeditor';
  4. import { CodeMirrorEditorFactory } from './factory';
  5. import { CodeMirrorMimeTypeService } from './mimetype';
  6. export * from './mode';
  7. export * from './editor';
  8. export * from './factory';
  9. export * from './mimetype';
  10. export * from './syntaxstatus';
  11. export * from './tokens';
  12. /**
  13. * The default editor services.
  14. */
  15. export const editorServices: IEditorServices = {
  16. factoryService: new CodeMirrorEditorFactory(),
  17. mimeTypeService: new CodeMirrorMimeTypeService()
  18. };
  19. /**
  20. * FIXME-TRANS: Maybe an option to be able to pass a translator to the factories?
  21. *
  22. export function getEditorServices(translator: ITranslator): IEditorServices {
  23. return {
  24. factoryService: new CodeMirrorEditorFactory({}, translator),
  25. mimeTypeService: new CodeMirrorMimeTypeService(translator)
  26. };
  27. }
  28. */