Skip to content

Commit c958f5f

Browse files
committed
DOC-2581: Added improvements to srcset, svg file name changes, general copy edits.
1 parent 5ff1720 commit c958f5f

File tree

7 files changed

+47
-21
lines changed

7 files changed

+47
-21
lines changed
File renamed without changes.

modules/ROOT/pages/uploadcare.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ Below is an overview of the features of the {pluginname} plugin includes for ima
8383
| Allows users to apply transformations to the image:
8484

8585
|
86-
| Rotate Counterclockwise
86+
| Rotate Left
8787
| image:icons/rotate-left.svg[rotate-left.svg]
88-
| Rotates the image counterclockwise.
88+
| Rotates the image counterclockwise (left).
8989

9090
|
91-
| Rotate Clockwise
91+
| Rotate Right
9292
| image:icons/rotate-right.svg[rotate-right.svg]
93-
| Rotates the image clockwise.
93+
| Rotates the image clockwise (right).
9494

9595
|
9696
| Flip Vertically
@@ -177,9 +177,9 @@ Below is an overview of the features of the {pluginname} plugin includes for ima
177177
| image:icons/blur.svg[blur.svg]
178178
| Blurs the image.
179179

180-
| Revert Changes
180+
| Revert
181181
|
182-
| image:icons/revert-changes.svg[revert-changes.svg]
182+
| image:icons/revert.svg[revert.svg]
183183
| Restores the image to its original state by undoing all edits.
184184
|===
185185

modules/ROOT/partials/configuration/icon_list.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
| `+resize-handle+` | image:icons/resize-handle.svg[resize-handle.svg] | `+resize-handle.svg+`
158158
| `+resize+` | image:icons/resize.svg[resize.svg] | `+resize.svg+`
159159
| `+restore-draft+` | image:icons/restore-draft.svg[restore-draft.svg] | `+restore-draft.svg+`
160-
| `+revert-changes+` | image:icons/revert-changes.svg[revert-changes.svg] | `+revert-changes.svg+`
160+
| `+revert+` | image:icons/revert.svg[revert.svg] | `+revert.svg+`
161161
| `+revision-history+` | image:icons/revision-history.svg[revision-history.svg] | `+revision-history.svg+`
162162
| `+rotate-left+` | image:icons/rotate-left.svg[rotate-left.svg] | `+rotate-left.svg+`
163163
| `+rotate-right+` | image:icons/rotate-right.svg[rotate-right.svg] | `+rotate-right.svg+`

modules/ROOT/partials/configuration/uploadcare_signed_upload_auth_provider.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[[uploadcare-signed-upload-auth-provider]]
22
== `uploadcare_signed_upload_auth_provider`
33

4-
Specifies a function used to generate secure signatures for authenticated requests to Uploadcare. This is necessary when using secure Uploadcare features, such as signed uploads. The function should return a `Promise` that resolves with an object containing the signature and expiration timestamp.
4+
Specifies a function used to generate secure signatures for authenticated requests to Uploadcare. This function is required when enabling Uploadcare's signed uploads feature, which ensures that only authorized users can upload files using your `uploadcare_public_key`. The function should return a `Promise` that resolves with an object containing the signature and expiration timestamp.
55

6-
Use this option if you want to ensure secure uploads or restrict file access using Uploadcare's signed uploads feature.
6+
Use this option to enforce secure uploads, preventing unauthorized users from uploading files via your application.
77

88
*Type:* `+Function+`
99

@@ -25,12 +25,13 @@ tinymce.init({
2525

2626
[IMPORTANT]
2727
====
28-
{companyname} recommends configuring the `uploadcare_signed_upload_auth_provider` option to enable signed uploads and enhance security when integrating with Uploadcare. This option is essential for applications requiring:
28+
{companyname} recommends configuring the `uploadcare_signed_upload_auth_provider` option to secure uploads and prevent misuse of your Uploadcare `uploadcare_public_key`. This option is essential for applications requiring:
2929
30-
* Secure file uploads by preventing unauthorized access.
31-
* Restriction of file access to specific users or sessions.
30+
* Prevention of unauthorized file uploads via your `uploadcare_public_key`.
31+
* Enforcement of secure upload practices for application integrity.
3232
33-
The `uploadcare_signed_upload_auth_provider` ensures that every request is authenticated with a generated signature and expiration timestamp, providing an additional layer of security for sensitive data.
33+
[NOTE]
34+
This option **only** secures unauthorized access to upload files to the uploadcare storage by verifying signatures during uploads.
3435
35-
Using this option will help safeguard your application by ensuring secure file uploads, protecting sensitive data, and maintaining system integrity. {companyname} strongly advises including this configuration as a fundamental part of your Uploadcare integration setup.
36-
====
36+
For most integrations, enabling signed uploads by configuring this option ensures that only authorized uploads occur, reducing the risk of abuse and maintaining secure usage of your `uploadcare_public_key`.
37+
====
Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,48 @@
11
[[uploadcare-srcset-steps]]
22
== `uploadcare_srcset_steps`
33

4-
Defines an array of numeric values representing the widths for responsive images. These widths are used to generate the `srcset` attribute for images, allowing browsers to select the most appropriate resolution based on the device's display and network conditions.
4+
Specifies an array of numeric values representing the widths used to generate the `srcset` attribute for responsive images. This enables browsers to select the most suitable resolution based on the devices display and network conditions.
55

6-
Customize this array to include only the widths you need for your application. For example, you can reduce the number of resolutions for faster processing or add specific sizes required for your layout.
6+
Customize this array to include **only** the widths required for your application. Reducing the number of resolutions can improve processing speed, while adding specific sizes can accommodate unique layout needs.
77

88
*Type:* `+Array+`
99

1010
*Default:* `+[100, 200, 300, 500, 750, 1000, 1250, 1500, 2000, 2500, 3000]+`
1111

12+
=== Example: Generated `srcset` Attribute with Custom Widths
13+
14+
When an image is uploaded, its original width is used to create a `srcset` attribute with downscaled images for the defined widths. For instance, if the image width is 780 pixels and `uploadcare_srcset_steps` is set to `[100, 200, 300, 500, 750]`, the resulting `srcset` will look like this:
15+
16+
.Example: Responsive 780px Image with Custom Widths in `srcset`
17+
[source,html]
18+
----
19+
<img
20+
style="width: min(780px, 100%); aspect-ratio: 780 / 780;"
21+
src="https://ucarecdn.com/de937e77-2fec-4781-91c1-55dae67803cd/-/preview/"
22+
sizes="(min-width: 780px) 780px, 100vw"
23+
srcset="
24+
https://ucarecdn.com/de937e77-2fec-4781-91c1-55dae67803cd/-/resize/100x/ 100w,
25+
https://ucarecdn.com/de937e77-2fec-4781-91c1-55dae67803cd/-/resize/200x/ 200w,
26+
https://ucarecdn.com/de937e77-2fec-4781-91c1-55dae67803cd/-/resize/300x/ 300w,
27+
https://ucarecdn.com/de937e77-2fec-4781-91c1-55dae67803cd/-/resize/500x/ 500w,
28+
https://ucarecdn.com/de937e77-2fec-4781-91c1-55dae67803cd/-/resize/750x/ 750w,
29+
https://ucarecdn.com/de937e77-2fec-4781-91c1-55dae67803cd/-/preview/ 780w
30+
">
31+
----
32+
33+
This ensures the browser selects the optimal image size based on the viewport and device characteristics, enhancing performance and user experience. On devices with narrower viewports, smaller images (e.g., 100w or 200w) will be prioritized, reducing bandwidth usage.
34+
1235
=== Example: Customizing `uploadcare_srcset_steps`
1336

37+
To customize the array, update the configuration as shown below:
38+
1439
[source,js]
1540
----
1641
tinymce.init({
1742
selector: 'textarea',
1843
plugins: 'uploadcare',
1944
toolbar: 'uploadcare',
2045
uploadcare_public_key: '<your-public-key>',
21-
uploadcare_srcset_steps: [100, 200, 300, 500],
46+
uploadcare_srcset_steps: [100, 200, 300, 500, 750],
2247
});
23-
----
48+
----
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[cols="1,3",options="header"]
22
|===
33
|Identifier |Description
4-
| `+uploadcare+` | Inserts a `<p>` tag with the `+contenteditable="false"+` attribute, containing a placeholder image. This placeholder supports image uploads via drag-and-drop, file selection, or by providing a URL.
4+
| `+uploadcare+` | Inserts a image placeholder element. This placeholder supports image uploads via drag-and-drop, file selection, or by providing a URL.
55
|===
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[cols="1,3",options="header"]
22
|===
33
|Identifier |Description
4-
| `+uploadcare+` | Inserts a `<p>` tag with the `+contenteditable="false"+` attribute, containing a placeholder image. This placeholder supports image uploads via drag-and-drop, file selection, or by providing a URL.
4+
| `+uploadcare+` | Inserts a image placeholder element. This placeholder supports image uploads via drag-and-drop, file selection, or by providing a URL.
55
|===

0 commit comments

Comments
 (0)