Skip to content

Commit f627a60

Browse files
committed
DOC-2581: Copy edits, update uploadcare config to use partials.
1 parent ae154b7 commit f627a60

File tree

8 files changed

+150
-136
lines changed

8 files changed

+150
-136
lines changed

modules/ROOT/pages/uploadcare.adoc

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,21 @@ Below is an overview of the features of the {pluginname} plugin includes for ima
187187

188188
The following configuration options affect the behavior of the {pluginname} plugin.
189189

190-
include::partial$configuration/{plugincode}.adoc[leveloffset=+1]
190+
include::partial$configuration/uploadcare_public_key.adoc[leveloffset=+1]
191191

192-
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[leveloffset=+1]
192+
include::partial$configuration/uploadcare_signed_upload_auth_provider.adoc[leveloffset=+1]
193193

194-
include::partial$misc/plugin-menu-item-id-boilerplate.adoc[leveloffset=+1]
194+
include::partial$configuration/uploadcare_cdn_base_url.adoc[leveloffset=+1]
195+
196+
include::partial$configuration/uploadcare_srcset_steps.adoc[leveloffset=+1]
197+
198+
include::partial$configuration/uploadcare_store_type.adoc[leveloffset=+1]
199+
200+
201+
== Optional Option
202+
203+
include::partial$configuration/a11y_advanced_options.adoc[leveloffset=+1]
204+
205+
include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[]
206+
207+
include::partial$misc/plugin-menu-item-id-boilerplate.adoc[]

modules/ROOT/partials/configuration/a11y_advanced_options.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
This option affects the functionality of:
55

6-
* The Accessibility Checker plugin (`+a11ychecker+`).
7-
* The Image plugin (`+image+`).
6+
* The xref:a11ychecker.adoc[Accessibility Checker] plugin (`+a11ychecker+`).
7+
* The xref:image.adoc[Image] plugin (`+image+`).
8+
* The xref:uploadcare.adoc[Image Optimizer Powered by Uploadcare] (`+uploadcare+`).
89

910
Setting `+a11y_advanced_options+` to `+true+`:
1011

11-
* Adds the *Image is decorative* option to the _Insert/Edit Image_ dialog, allowing users to specify that an image is decorative and does not require alternative text for accessibility purposes.
12+
* Adds the *Image is decorative* option to the _Insert/Edit Image_ or _Insert/Edit Image Optimizer_ dialog, allowing users to specify that an image is decorative and does not require alternative text for accessibility purposes.
1213
* Adds the *Image is decorative* option to the _Accessibility Checker error_ dialog for images without alternative text or the `+role="presentation"+` attribute.
1314

1415
IMPORTANT: When `+a11y_advanced_options+` is set to `+true+`, xref:a11ychecker.adoc#a11ychecker_allow_decorative_images[`+a11ychecker_allow_decorative_images+`] will default to `+true+`.

modules/ROOT/partials/configuration/uploadcare.adoc

Lines changed: 0 additions & 130 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[[uploadcare-cdn-base-url]]
2+
== `uploadcare_cdn_base_url`
3+
4+
Specifies the domain used for the Uploadcare service. This domain determines where your files are uploaded and accessed. By default, the plugin uses the Uploadcare CDN `ucarecdn.com` to host and deliver your files. If you use a custom domain, update this option to match your configuration.
5+
6+
*Type:* `+String+`
7+
8+
*Default:* `+https://ucarecdn.com/+`
9+
10+
=== Example: Customizing `uploadcare_cdn_base_url`
11+
12+
[source,js]
13+
----
14+
tinymce.init({
15+
selector: "textarea",
16+
plugins: 'uploadcare',
17+
toolbar: 'uploadcare',
18+
uploadcare_public_key: '<your-public-key>',
19+
uploadcare_cdn_base_url: 'https://cdn.mydomain.com',
20+
});
21+
----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[[uploadcare-public-key]]
2+
== `uploadcare_public_key`
3+
4+
Defines the public API key required to authenticate and interact with the Uploadcare API. This key identifies your account and ensures that uploads and operations are associated with your project. Without setting this key, the Uploadcare integration will not function.
5+
6+
[IMPORTANT]
7+
This option is mandatory for using Uploadcare.
8+
9+
*Type:* `+String+`
10+
11+
=== Example: Setting `uploadcare_public_key`
12+
13+
[source,js]
14+
----
15+
tinymce.init({
16+
selector: 'textarea',
17+
plugins: 'uploadcare',
18+
toolbar: 'uploadcare',
19+
uploadcare_public_key: '<your-public-key>',
20+
});
21+
----
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[[uploadcare-signed-upload-auth-provider]]
2+
== `uploadcare_signed_upload_auth_provider`
3+
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.
5+
6+
Use this option if you want to ensure secure uploads or restrict file access using Uploadcare's signed uploads feature.
7+
8+
*Type:* `+Function+`
9+
10+
=== Example: Setting `uploadcare_signed_upload_auth_provider`
11+
12+
[source,js]
13+
----
14+
tinymce.init({
15+
selector: 'textarea',
16+
plugins: 'uploadcare',
17+
toolbar: 'uploadcare',
18+
uploadcare_public_key: '<your-public-key>',
19+
uploadcare_signed_upload_auth_provider: (_publicKey) => Promise.resolve({
20+
signature: 'sig',
21+
expire: 123
22+
}),
23+
});
24+
----
25+
26+
[IMPORTANT]
27+
====
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:
29+
30+
* Secure file uploads by preventing unauthorized access.
31+
* Restriction of file access to specific users or sessions.
32+
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.
34+
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+
====
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[[uploadcare-srcset-steps]]
2+
== `uploadcare_srcset_steps`
3+
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.
5+
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.
7+
8+
*Type:* `+Array+`
9+
10+
*Default:* `+[100, 200, 300, 500, 750, 1000, 1250, 1500, 2000, 2500, 3000]+`
11+
12+
=== Example: Customizing `uploadcare_srcset_steps`
13+
14+
[source,js]
15+
----
16+
tinymce.init({
17+
selector: 'textarea',
18+
plugins: 'uploadcare',
19+
toolbar: 'uploadcare',
20+
uploadcare_public_key: '<your-public-key>',
21+
uploadcare_srcset_steps: [100, 200, 300, 500],
22+
});
23+
----
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[[uploadcare-store-type]]
2+
== `uploadcare_store_type`
3+
4+
Specifies the storage type for uploaded files. Use this option to control whether files are stored temporarily or permanently, or allow Uploadcare to decide automatically based on your account settings.
5+
6+
* `auto`: Default behavior; Uploadcare decides the storage type.
7+
* `temporary`: Files are stored temporarily and will expire after a certain period.
8+
* `permanent`: Files are stored permanently in your Uploadcare account.
9+
10+
Select the appropriate value based on your application's requirements, such as whether files should persist for long-term use or be available for a limited time.
11+
12+
*Type:* `+String+`
13+
14+
*Default:* `permanent`
15+
16+
*Possible values:* `auto`, `temporary`, `permanent`
17+
18+
=== Example: Using `uploadcare_store_type`
19+
20+
[source,js]
21+
----
22+
tinymce.init({
23+
selector: 'textarea',
24+
plugins: 'uploadcare',
25+
toolbar: 'uploadcare',
26+
uploadcare_public_key: '<your-public-key>',
27+
uploadcare_store_type: 'permanent',
28+
});
29+
----

0 commit comments

Comments
 (0)