Skip to content

Commit 84b9484

Browse files
committed
DOC-3310: Fix uploadcare_resources option examples
1 parent 2512773 commit 84b9484

1 file changed

Lines changed: 6 additions & 47 deletions

File tree

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
[[uploadcare-resources]]
22
== `uploadcare_resources`
33

4-
Specifies the base path where the Uploadcare plugin resources are served from. This option is primarily used when bundling {productname} with webpack or other bundlers, where the plugin needs to know where to load additional resources such as the `ucvideo.min.js` file for video functionality.
5-
6-
When {productname} is bundled, the Uploadcare plugin cannot automatically determine where its additional resources are located. This option tells the plugin where to find these resources by specifying the root path to the Uploadcare plugin directory.
4+
Specifies the base path where the Uploadcare plugin resources are loaded from. This allows you to specify a different location for the Uploadcare resources if they are hosted separately from the main {productname} installation.
75

86
*Type:* `+String+`
97

10-
*Default:* `+undefined+`
11-
12-
*Possible values:* A string that points to the root path of the Uploadcare plugin directory.
13-
14-
[NOTE]
15-
This option is only required when using the **Media Optimizer** as a paid "addon" and bundling {productname} with webpack or similar bundling tools.
8+
*Default:* `+'<plugin-path>'+`
169

1710
.Example: Setting `uploadcare_resources`
1811
[source,js]
@@ -22,53 +15,19 @@ tinymce.init({
2215
plugins: 'uploadcare',
2316
toolbar: 'uploadcare uploadcare-video',
2417
uploadcare_public_key: '<your-public-key>',
25-
uploadcare_resources: 'uploadcare/uploadcare', // Points to the uploadcare plugin directory
18+
uploadcare_resources: 'path/to/uploadcare-resources/',
2619
license_key: '<your-license-key>'
2720
});
2821
----
2922

30-
=== Complete Bundled Setup Example
31-
32-
For a complete example of setting up {productname} with the Uploadcare addon, see the bundled setup example:
33-
34-
[source,html]
35-
----
36-
<!DOCTYPE html>
37-
<html lang="en">
38-
<head>
39-
<meta charset="UTF-8">
40-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
41-
<title>TinyMCE with Uploadcare Addon</title>
42-
<script src="path/to/tinymce/tinymce.min.js"></script> <!-- points to the tinymce.min.js file in your project -->
43-
<script src="path/to/uploadcare/uploadcare/plugin.min.js"></script> <!-- points to the uploadcare plugin.min.js file in your project -->
44-
</head>
45-
<body>
46-
<textarea>Welcome to TinyMCE with Uploadcare!</textarea>
47-
<script>
48-
tinymce.init({
49-
selector: 'textarea',
50-
plugins: [
51-
"uploadcare"
52-
],
53-
toolbar: "uploadcare uploadcare-video",
54-
uploadcare_resources: 'path/to/uploadcare/uploadcare', // points to the uploadcare plugin directory
55-
uploadcare_public_key: '<your-public-key>',
56-
license_key: '<your-license-key>'
57-
});
58-
</script>
59-
</body>
60-
</html>
61-
----
62-
63-
=== Resource Structure
23+
=== Directory Structure
6424

65-
When using `uploadcare_resources`, ensure your directory structure follows this pattern:
25+
When using `uploadcare_resources`, ensure your directory structure follows this pattern, specifically the `js` and `css` subdirectories:
6626

6727
.Example directory structure:
6828
[source,text]
6929
----
7030
project/
71-
├── uploadcare/
7231
│ └── uploadcare/
7332
│ ├── js/
7433
│ │ └── ucvideo.min.js
@@ -79,4 +38,4 @@ project/
7938
└── tinymce.min.js
8039
----
8140

82-
The plugin will automatically append the necessary subpaths (e.g., `/js/ucvideo.min.js`) to the base path you specify.
41+
NOTE: This option does not control the loading of the main Uploadcare plugin script, which should be included in the `+plugins+` or `+external_plugins+` configuration options as appropriate.

0 commit comments

Comments
 (0)