diff --git a/resources/js/code.mjs b/resources/js/code.mjs index 9ffe76fe6..ad282f2be 100644 --- a/resources/js/code.mjs +++ b/resources/js/code.mjs @@ -28,6 +28,7 @@ import 'codemirror/mode/rust/rust'; import 'codemirror/mode/shell/shell'; import 'codemirror/mode/sql/sql'; import 'codemirror/mode/stex/stex'; +import 'codemirror/mode/swift/swift'; import 'codemirror/mode/toml/toml'; import 'codemirror/mode/vb/vb'; import 'codemirror/mode/vbscript/vbscript'; @@ -93,11 +94,12 @@ const modeMap = { rs: 'rust', shell: 'shell', sh: 'shell', + sql: 'text/x-sql', stext: 'text/x-stex', + swift: 'text/x-swift', toml: 'toml', ts: 'text/typescript', typescript: 'text/typescript', - sql: 'text/x-sql', vbs: 'vbscript', vbscript: 'vbscript', 'vb.net': 'text/x-vb', diff --git a/resources/views/pages/parts/code-editor.blade.php b/resources/views/pages/parts/code-editor.blade.php index a926e5d76..18c9ad423 100644 --- a/resources/views/pages/parts/code-editor.blade.php +++ b/resources/views/pages/parts/code-editor.blade.php @@ -25,8 +25,8 @@ $languages = [ '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', + 'Octave', 'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'SQL', 'Swift', + 'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML', ]; @endphp