Initial scaffold from yo joplin
This commit is contained in:
commit
de18d28146
37 changed files with 5991 additions and 0 deletions
45
api/JoplinClipboard.d.ts
vendored
Normal file
45
api/JoplinClipboard.d.ts
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { ClipboardContent } from './types';
|
||||
export default class JoplinClipboard {
|
||||
private electronClipboard_;
|
||||
private electronNativeImage_;
|
||||
constructor(electronClipboard: any, electronNativeImage: any);
|
||||
readText(): Promise<string>;
|
||||
writeText(text: string): Promise<void>;
|
||||
/** <span class="platform-desktop">desktop</span> */
|
||||
readHtml(): Promise<string>;
|
||||
/** <span class="platform-desktop">desktop</span> */
|
||||
writeHtml(html: string): Promise<void>;
|
||||
/**
|
||||
* Returns the image in [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) format.
|
||||
*
|
||||
* <span class="platform-desktop">desktop</span>
|
||||
*/
|
||||
readImage(): Promise<string>;
|
||||
/**
|
||||
* Takes an image in [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) format.
|
||||
*
|
||||
* <span class="platform-desktop">desktop</span>
|
||||
*/
|
||||
writeImage(dataUrl: string): Promise<void>;
|
||||
/**
|
||||
* Returns the list available formats (mime types).
|
||||
*
|
||||
* For example [ 'text/plain', 'text/html' ]
|
||||
*/
|
||||
availableFormats(): Promise<string[]>;
|
||||
/**
|
||||
* Writes multiple formats to the clipboard simultaneously.
|
||||
* This allows setting both text/plain and text/html at the same time.
|
||||
*
|
||||
* <span class="platform-desktop">desktop</span>
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* await joplin.clipboard.write({
|
||||
* text: 'Plain text version',
|
||||
* html: '<strong>HTML version</strong>'
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
write(content: ClipboardContent): Promise<void>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue