Swimergg
@Swimergg
Пишу код, и узнаю много чего интересного

Где взять все языки CodeMirror?

Где взять все Language mode? На сайте множество языков это c-like, по этому даже та самая Java выглядит мягко говоря не очень -
6145ccd5231a4286550053.png

Где взять список ВСЕХ языков? Что-бы они автоматически применялись
  • Вопрос задан
  • 86 просмотров
Пригласить эксперта
Ответы на вопрос 1
vabka
@vabka
Токсичный шарпист
Об этом есть инфа в мануале:
The mode to use. When not given, this will default to the first mode that was loaded. It may be a string, which either simply names the mode or is a MIME type associated with the mode. The value "null" indicates no highlighting should be applied. Alternatively, it may be an object containing configuration options for the mode, with a name property that names the mode (for example {name: "javascript", json: true}). The demo pages for each mode contain information about what configuration parameters the mode supports. You can ask CodeMirror which modes and MIME types have been defined by inspecting the CodeMirror.modes and CodeMirror.mimeModes objects. The first maps mode names to their constructors, and the second maps MIME types to mode specs.

https://codemirror.net/doc/manual.html

А почему на вашем скрине жава выглядит плохо - это надо смотреть на то, как сконфигурирован CodeMirror

Из коробки есть вот такие языки: https://codemirror.net/mode/index.html
И Java в том числе:
6145e5ec3772d587620515.png
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы