mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
fix(code): syntax highlighting not working in read-only code
This commit is contained in:
parent
b1f08b944a
commit
c24e1f0ec5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user