You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Android: Add support for Markdown editor plugins (#10086)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
@ -0,0 +1,39 @@
|
||||
import { CommandDeclaration } from '@joplin/lib/services/CommandService';
|
||||
|
||||
export const enabledCondition = (_commandName: string) => {
|
||||
const output = [
|
||||
'!modalDialogVisible',
|
||||
'!noteIsReadOnly',
|
||||
];
|
||||
|
||||
return output.filter(c => !!c).join(' && ');
|
||||
};
|
||||
|
||||
const declarations: CommandDeclaration[] = [
|
||||
{
|
||||
name: 'insertText',
|
||||
},
|
||||
{
|
||||
name: 'editor.undo',
|
||||
},
|
||||
{
|
||||
name: 'editor.redo',
|
||||
},
|
||||
{
|
||||
name: 'selectedText',
|
||||
},
|
||||
{
|
||||
name: 'replaceSelection',
|
||||
},
|
||||
{
|
||||
name: 'editor.setText',
|
||||
},
|
||||
{
|
||||
name: 'editor.focus',
|
||||
},
|
||||
{
|
||||
name: 'editor.execCommand',
|
||||
},
|
||||
];
|
||||
|
||||
export default declarations;
|
Reference in New Issue
Block a user