File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed
packages/app-desktop/commands Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ packages/app-desktop/app.js
151
151
packages /app-desktop /bridge.js
152
152
packages /app-desktop /checkForUpdates.js
153
153
packages /app-desktop /commands /copyDevCommand.js
154
+ packages /app-desktop /commands /copyToClipboard.js
154
155
packages /app-desktop /commands /editProfileConfig.js
155
156
packages /app-desktop /commands /emptyTrash.js
156
157
packages /app-desktop /commands /exportDeletionLog.test.js
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ packages/app-desktop/app.js
125
125
packages /app-desktop /bridge.js
126
126
packages /app-desktop /checkForUpdates.js
127
127
packages /app-desktop /commands /copyDevCommand.js
128
+ packages /app-desktop /commands /copyToClipboard.js
128
129
packages /app-desktop /commands /editProfileConfig.js
129
130
packages /app-desktop /commands /emptyTrash.js
130
131
packages /app-desktop /commands /exportDeletionLog.test.js
Original file line number Diff line number Diff line change
1
+ import { CommandRuntime , CommandDeclaration } from '@joplin/lib/services/CommandService' ;
2
+ import { clipboard } from 'electron' ;
3
+
4
+ export const declaration : CommandDeclaration = {
5
+ name : 'copyToClipboard' ,
6
+ } ;
7
+
8
+ export const runtime = ( ) : CommandRuntime => {
9
+ return {
10
+ execute : async ( _context , content : string ) => {
11
+ if ( ! content || ( typeof content !== 'string' ) ) return ;
12
+ clipboard . writeText ( content ) ;
13
+ } ,
14
+ } ;
15
+ } ;
Original file line number Diff line number Diff line change 1
1
// AUTO-GENERATED using `gulp buildScriptIndexes`
2
2
import * as copyDevCommand from './copyDevCommand' ;
3
+ import * as copyToClipboard from './copyToClipboard' ;
3
4
import * as editProfileConfig from './editProfileConfig' ;
4
5
import * as emptyTrash from './emptyTrash' ;
5
6
import * as exportDeletionLog from './exportDeletionLog' ;
@@ -24,6 +25,7 @@ import * as toggleTabMovesFocus from './toggleTabMovesFocus';
24
25
25
26
const index : any [ ] = [
26
27
copyDevCommand ,
28
+ copyToClipboard ,
27
29
editProfileConfig ,
28
30
emptyTrash ,
29
31
exportDeletionLog ,
You can’t perform that action at this time.
0 commit comments