Skip to content

Commit 412243b

Browse files
committed
feat: option to disable default shortcuts
1 parent de97227 commit 412243b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/ml-tweak.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function configureMF(mfe: MathfieldElement) {
2222
}
2323
try {
2424
mfe.inlineShortcuts = {
25-
...mfe.inlineShortcuts,
25+
...(logseq.settings?.disableDefaultShortcuts ? null : mfe.inlineShortcuts),
2626
...logseq.settings?.inlineShortcuts,
2727
}
2828
} catch (err) {

src/settings.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,11 @@ export const settingsConfig: SettingSchemaDesc[] = [
112112
Logseq: '\\mathrm{Logseq}',
113113
},
114114
},
115+
{
116+
title: 'Disable default shortcuts',
117+
description: 'Disable default inline shortcuts defined by MathLive.',
118+
key: 'disableDefaultShortcuts',
119+
type: 'boolean',
120+
default: false,
121+
},
115122
]

0 commit comments

Comments
 (0)