Added dart support to code blocks/editing

For #3808
This commit is contained in:
Dan Brown 2022-11-10 13:38:56 +00:00
parent 4c75358abd
commit 5fd1c07c9d
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import Clipboard from "clipboard/dist/clipboard.min";
// Modes
import 'codemirror/mode/css/css';
import 'codemirror/mode/clike/clike';
import 'codemirror/mode/dart/dart';
import 'codemirror/mode/diff/diff';
import 'codemirror/mode/fortran/fortran';
import 'codemirror/mode/go/go';
@ -49,6 +50,7 @@ const modeMap = {
'c++': 'text/x-c++src',
'c#': 'text/x-csharp',
csharp: 'text/x-csharp',
dart: 'application/dart',
diff: 'diff',
for: 'fortran',
fortran: 'fortran',

View File

@ -23,7 +23,7 @@
<div refs="code-editor@language-options-container" class="lang-options">
@php
$languages = [
'Bash', 'CSS', 'C', 'C++', 'C#', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI',
'Bash', 'CSS', 'C', 'C++', 'C#', 'Dart', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI',
'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'MATLAB', 'Nginx', 'OCaml',
'Octave', 'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'SQL', 'TypeScript',
'VBScript', 'VB.NET', 'XML', 'YAML',