mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-25 14:31:33 +08:00
feat: 🎸 Fix ts compile error
This commit is contained in:
parent
c8164c81be
commit
9d49546bc9
1
src/public/app/types.d.ts
vendored
1
src/public/app/types.d.ts
vendored
@ -204,6 +204,7 @@ declare global {
|
|||||||
tabindex: number;
|
tabindex: number;
|
||||||
dragDrop: boolean;
|
dragDrop: boolean;
|
||||||
placeholder: string;
|
placeholder: string;
|
||||||
|
readOnly: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
var CodeMirror: {
|
var CodeMirror: {
|
||||||
|
@ -50,6 +50,13 @@ export default class AbstractCodeTypeWidget extends TypeWidget {
|
|||||||
matchTags: { bothTags: true },
|
matchTags: { bothTags: true },
|
||||||
highlightSelectionMatches: { showToken: false, annotateScrollbar: false },
|
highlightSelectionMatches: { showToken: false, annotateScrollbar: false },
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
|
keyMap: "default",
|
||||||
|
lint: false,
|
||||||
|
gutters: [],
|
||||||
|
tabindex: 0,
|
||||||
|
dragDrop: true,
|
||||||
|
placeholder: "",
|
||||||
|
readOnly: false,
|
||||||
// we line wrap partly also because without it horizontal scrollbar displays only when you scroll
|
// we line wrap partly also because without it horizontal scrollbar displays only when you scroll
|
||||||
// all the way to the bottom of the note. With line wrap, there's no horizontal scrollbar so no problem
|
// all the way to the bottom of the note. With line wrap, there's no horizontal scrollbar so no problem
|
||||||
lineWrapping: options.is("codeLineWrapEnabled"),
|
lineWrapping: options.is("codeLineWrapEnabled"),
|
||||||
|
@ -36,7 +36,7 @@ export default class BackendLogWidget extends AbstractCodeTypeWidget {
|
|||||||
await this.load();
|
await this.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
getExtraOpts() {
|
getExtraOpts(): Partial<CodeMirrorOpts> {
|
||||||
return {
|
return {
|
||||||
lineWrapping: false,
|
lineWrapping: false,
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -43,7 +43,7 @@ export default class ReadOnlyCodeTypeWidget extends AbstractCodeTypeWidget {
|
|||||||
this.show();
|
this.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
getExtraOpts() {
|
getExtraOpts(): Partial<CodeMirrorOpts> {
|
||||||
return {
|
return {
|
||||||
readOnly: true
|
readOnly: true
|
||||||
};
|
};
|
||||||
@ -100,7 +100,7 @@ export default class ReadOnlyCodeTypeWidget extends AbstractCodeTypeWidget {
|
|||||||
return ret;
|
return ret;
|
||||||
});
|
});
|
||||||
|
|
||||||
for (i = pre.length; i--; ) {
|
for (i = pre.length; i--;) {
|
||||||
html = html.replace("<--TEMPPRE" + i + "/-->", pre[i].tag.replace("<pre>", "<pre>\n").replace("</pre>", pre[i].indent + "</pre>"));
|
html = html.replace("<--TEMPPRE" + i + "/-->", pre[i].tag.replace("<pre>", "<pre>\n").replace("</pre>", pre[i].indent + "</pre>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user