mirror of
https://github.com/directus/directus.git
synced 2026-01-25 06:47:57 -05:00
@@ -55,7 +55,7 @@ export default defineComponent({
|
||||
},
|
||||
language: {
|
||||
type: String,
|
||||
default: 'text/plain',
|
||||
default: 'plaintext',
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
@@ -154,7 +154,7 @@ export default defineComponent({
|
||||
}
|
||||
return found;
|
||||
});
|
||||
} else if (lang === 'text/plain') {
|
||||
} else if (lang === 'plaintext') {
|
||||
codemirror.value.setOption('mode', { name: null });
|
||||
} else {
|
||||
await import(`codemirror/mode/${lang}/${lang}.js`);
|
||||
|
||||
@@ -9,11 +9,16 @@ const choicesMap = CodeMirror.modeInfo.reduce((acc: Record<string, string>, choi
|
||||
return acc;
|
||||
}
|
||||
|
||||
if (choice.mode == null || choice.mode == 'null') {
|
||||
choice.mode = 'plaintext';
|
||||
}
|
||||
|
||||
if (choice.mode in acc) {
|
||||
acc[choice.mode] += ' / ' + choice.name;
|
||||
} else {
|
||||
acc[choice.mode] = choice.name;
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user