Skip to content

CodeViewer: remove codemirror dependency and implement decorators by hand #577

Closed
@danilowoz

Description

@danilowoz

Currently, the CodeViewer component uses the same component from CodeEditor to highlight and set the decorators on the code block. However, as this component might be static and it's already read-only, we could try to remove the CodeMirror dependency in order to turn it lightweight and free of dependency.

As a result, this would avoid the initialization a new CodeMirror instance on every new codeblock, and turn the implementation way simple.

TODO:

  • Split CodeViewer and CodeMirror in two;
  • Implement syntax-highlight;
  • Implement decorators;

Reference: reactjs/react.dev#5110

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew issues that needs consideration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions