You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
16 lines
418 B
TypeScript
16 lines
418 B
TypeScript
import { CommandRuntime, CommandDeclaration } from '@joplin/lib/services/CommandService';
|
|
import { clipboard } from 'electron';
|
|
|
|
export const declaration: CommandDeclaration = {
|
|
name: 'copyToClipboard',
|
|
};
|
|
|
|
export const runtime = (): CommandRuntime => {
|
|
return {
|
|
execute: async (_context, content: string) => {
|
|
if (!content || (typeof content !== 'string')) return;
|
|
clipboard.writeText(content);
|
|
},
|
|
};
|
|
};
|