You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-13 22:12:50 +02:00
Desktop: Added menu item to format inline code (#1641)
* Revert "Fix for #1426, aded backticks to auto-wrapping quotes."
This reverts commit 7dee93076a
.
* changes to backtick behavior
- add shortcut ``` cmd+` ``` / ``` ctrl+` ```
- add menu item for `Inline code`
* rename menu item Inline Code -> Code
This commit is contained in:
committed by
Laurent Cozic
parent
2cf1cda128
commit
3fafda9684
@@ -668,6 +668,16 @@ class Application extends BaseApplication {
|
||||
name: 'textLink',
|
||||
});
|
||||
},
|
||||
}, {
|
||||
label: _('Code'),
|
||||
screens: ['Main'],
|
||||
accelerator: 'CommandOrControl+`',
|
||||
click: () => {
|
||||
this.dispatch({
|
||||
type: 'WINDOW_COMMAND',
|
||||
name: 'textCode',
|
||||
});
|
||||
},
|
||||
}, {
|
||||
type: 'separator',
|
||||
screens: ['Main'],
|
||||
|
@@ -896,9 +896,6 @@ class NoteTextComponent extends React.Component {
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
//fixes #1426 but this is an Ace issue, so it can be removed if ace/brace is updated.
|
||||
this.editor_.editor.getSession().getMode().$quotes = {'"': '"', "'": "'", "`": "`"};
|
||||
|
||||
// Disable Markdown auto-completion (eg. auto-adding a dash after a line with a dash.
|
||||
// https://github.com/ajaxorg/ace/issues/2754
|
||||
@@ -1022,6 +1019,8 @@ class NoteTextComponent extends React.Component {
|
||||
fn = this.commandStartExternalEditing;
|
||||
} else if (command.name === 'showLocalSearch') {
|
||||
fn = this.commandShowLocalSearch;
|
||||
} else if (command.name === 'textCode') {
|
||||
fn = this.commandTextCode;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user