From 84b94847466476099de75814c1c0f67edfc62dbc Mon Sep 17 00:00:00 2001 From: MitchCTiny Date: Mon, 27 Oct 2025 11:09:15 +1000 Subject: [PATCH 1/2] DOC-3310: Fix `uploadcare_resources` option examples --- .../configuration/uploadcare_resources.adoc | 53 +++---------------- 1 file changed, 6 insertions(+), 47 deletions(-) diff --git a/modules/ROOT/partials/configuration/uploadcare_resources.adoc b/modules/ROOT/partials/configuration/uploadcare_resources.adoc index ba2f0ffa97..fd9f2c7195 100644 --- a/modules/ROOT/partials/configuration/uploadcare_resources.adoc +++ b/modules/ROOT/partials/configuration/uploadcare_resources.adoc @@ -1,18 +1,11 @@ [[uploadcare-resources]] == `uploadcare_resources` -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. - -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. +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. *Type:* `+String+` -*Default:* `+undefined+` - -*Possible values:* A string that points to the root path of the Uploadcare plugin directory. - -[NOTE] -This option is only required when using the **Media Optimizer** as a paid "addon" and bundling {productname} with webpack or similar bundling tools. +*Default:* `+''+` .Example: Setting `uploadcare_resources` [source,js] @@ -22,53 +15,19 @@ tinymce.init({ plugins: 'uploadcare', toolbar: 'uploadcare uploadcare-video', uploadcare_public_key: '', - uploadcare_resources: 'uploadcare/uploadcare', // Points to the uploadcare plugin directory + uploadcare_resources: 'path/to/uploadcare-resources/', license_key: '' }); ---- -=== Complete Bundled Setup Example - -For a complete example of setting up {productname} with the Uploadcare addon, see the bundled setup example: - -[source,html] ----- - - - - - - TinyMCE with Uploadcare Addon - - - - - - - - ----- - -=== Resource Structure +=== Directory Structure -When using `uploadcare_resources`, ensure your directory structure follows this pattern: +When using `uploadcare_resources`, ensure your directory structure follows this pattern, specifically the `js` and `css` subdirectories: .Example directory structure: [source,text] ---- project/ -├── uploadcare/ │ └── uploadcare/ │ ├── js/ │ │ └── ucvideo.min.js @@ -79,4 +38,4 @@ project/ └── tinymce.min.js ---- -The plugin will automatically append the necessary subpaths (e.g., `/js/ucvideo.min.js`) to the base path you specify. +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. \ No newline at end of file From 891a1ca7d8c582601f7e2a24c3a296c939891de0 Mon Sep 17 00:00:00 2001 From: MitchCTiny Date: Mon, 27 Oct 2025 11:40:08 +1000 Subject: [PATCH 2/2] DOC-3310: Filenames are important too --- modules/ROOT/partials/configuration/uploadcare_resources.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/partials/configuration/uploadcare_resources.adoc b/modules/ROOT/partials/configuration/uploadcare_resources.adoc index fd9f2c7195..d9e5adaaab 100644 --- a/modules/ROOT/partials/configuration/uploadcare_resources.adoc +++ b/modules/ROOT/partials/configuration/uploadcare_resources.adoc @@ -20,9 +20,9 @@ tinymce.init({ }); ---- -=== Directory Structure +=== Resources Structure -When using `uploadcare_resources`, ensure your directory structure follows this pattern, specifically the `js` and `css` subdirectories: +When using `uploadcare_resources`, ensure your directory structure follows this pattern, specifically the `js` and `css` subdirectories, and that the necessary resource files are present: .Example directory structure: [source,text]