You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
7
5
8
6
*Type:* `+String+`
9
7
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>'+`
16
9
17
10
.Example: Setting `uploadcare_resources`
18
11
[source,js]
@@ -22,53 +15,19 @@ tinymce.init({
22
15
plugins: 'uploadcare',
23
16
toolbar: 'uploadcare uploadcare-video',
24
17
uploadcare_public_key: '<your-public-key>',
25
-
uploadcare_resources: 'uploadcare/uploadcare', // Points to the uploadcare plugin directory
<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
64
24
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:
66
26
67
27
.Example directory structure:
68
28
[source,text]
69
29
----
70
30
project/
71
-
├── uploadcare/
72
31
│ └── uploadcare/
73
32
│ ├── js/
74
33
│ │ └── ucvideo.min.js
@@ -79,4 +38,4 @@ project/
79
38
└── tinymce.min.js
80
39
----
81
40
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