Skip to content

Commit

Permalink
docs, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mcguffin committed Aug 24, 2021
1 parent e33fc30 commit 1c7c55e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 20 deletions.
66 changes: 48 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ Known Browser Support
Applications tested so far:
---------------------------

### Mac OS 10.11+:

| copy from / paste to | Firefox 55+ | Chrome 60+ | Safari 10+ |
|-----------------------|----------------|-----------------|-----------------|
| Mac Finder | -<sup>1)</sup> | OK | - |
| Mac Finder Screenshot | OK | OK | OK |
| Mac Preview | OK | OK | OK |
| Mac Photos App | - | OK | - |
| QuickTime Player | OK | OK | OK |
| Photoshop CC (2017) | OK | OK | OK |
| Illustrator CC | - | - | OK<sup>2)</sup> |
| A Webpage | OK | OK | OK |
| MS Word Mac | - | OK | OK |
| LibreOffice | OK | OK | OK |
| Gimp | OK | OK | OK |
| Affinity Designer | OK | OK<sup>3)</sup> | OK |
### Mac OS 10.15:

| copy from / paste to | Firefox 91+ | Chrome 92+ | Safari 14+ |
|-----------------------|----------------|------------|-----------------|
| Mac Finder | OK | OK | OK |
| Mac Finder Screenshot | OK | OK | OK |
| Mac Preview | OK | OK | OK |
| Mac Photos App | OK | OK | OK |
| QuickTime Player | OK | OK | OK |
| Photoshop CC (2017) | OK | OK | OK |
| Illustrator CC (2021) | - | OK | - <sup>1)</sup> |
| A Webpage | OK | OK | - |
| MS Word Mac | - | OK | OK |
| LibreOffice | OK | OK | OK |
| Gimp | OK | OK | OK |
| Affinity Designer | - | OK | - <sup>1)</sup> |
| Affinity Photo | OK | OK | OK |

### Windows 10

Expand All @@ -58,8 +59,37 @@ Applications tested so far:
-->


<sup>1)</sup> The file icon is pasted.
<sup>1)</sup> A PDF version of the image is pasted
<sup>2)</sup> A png version of the image data is pasted.
<sup>3)</sup> The pasted image has only half the size than in the other browsers.
<sup>4)</sup> The original image HTML gets pasted too.
<sup>5)</sup> If you have to confirm clipboard access—the first time you pasting something—the image gets removed after being pasted.
<sup>5)</sup> If you have to confirm clipboard access—the first time you paste something — the image gets removed after being pasted.

Plugin API:
-----------
### Filter `the_paste_max_embed_image_size`
Filter the maximum image size (in pixels) being pasted as data-url.

**Default (integer):** `262144` (= 512*215)

### Filter `the_paste_default_filename`

Filter the default filename. You can use internal placeholders a subset of php‘s `strftime()` as date/time placeholders.

**Default (string):** `"Pasted"`

**WordPress Placeholders:**
- `<postname>` Name of current post if present
- `<username>` Name of current user

**Date and Time placeholders:**
- `%Y` Four-digit year
- `%y` Two-digit year
- `%m` Number of month with leading zero (01 to 12)
- `%d` Day of month with leading zero (01 to 31)
- `%e` Day of month (1 to 31)
- `%H` Two digit hour in 24-hour format
- `%I` Two digit hour in 12-hour format
- `%M` Two digit minute
- `%S` Two digit second
- `%s` Unix timestamp (seconds since 1970-01-01 00:00:00 UTC)
11 changes: 9 additions & 2 deletions include/ThePaste/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ public function register_assets() {
'editor' => array(
'can_upload' => current_user_can( 'upload_files' ),
'auto_upload' => true,
'force_upload_size' => apply_filters('the_paste_max_embed_imge_size', 512 * 512 ),
/**
* Filters the default filename
*
* @param Int $size Max image size in pixels (width * height) being pasted as data url
*/
'force_upload_size' => apply_filters('the_paste_max_embed_image_size',
apply_filters('the_paste_max_embed_imge_size', 512 * 512 ) // backwards compatibility
),
),
'jpeg_quality' => apply_filters( 'jpeg_quality', 90, 'edit_image' ),
/**
Expand All @@ -105,7 +112,7 @@ public function register_assets() {
* %H Two digit hour in 24-hour format
* %I Two digit hour in 12-hour format
* %M Two digit minute
* %S Two digit minute
* %S Two digit second
* %s Unix timestamp
*/
'default_filename' => apply_filters( 'the_paste_default_filename', __( 'Pasted', 'the-paste' ) ),
Expand Down

0 comments on commit 1c7c55e

Please sign in to comment.