mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
fix(code): syntax highlighting not working in read-only code
This commit is contained in:
@@ -61,6 +61,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
|
||||
*/
|
||||
_update(note: FNote, content: string) {
|
||||
this.codeEditor.setText(content);
|
||||
this.codeEditor.setMimeType(note.mime);
|
||||
this.codeEditor.clearHistory();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,6 @@ export default class EditableCodeTypeWidget extends AbstractCodeTypeWidget {
|
||||
this._update(note, blob?.content ?? "");
|
||||
});
|
||||
|
||||
this.codeEditor.setMimeType(note.mime);
|
||||
this.show();
|
||||
|
||||
if (this.parent && hasTouchBar) {
|
||||
|
||||
Reference in New Issue
Block a user