Skip to content

Commit ba98d11

Browse files
committed
DOC-3329: Improve external_plugins description and example to be more specific.
1 parent 118db3e commit ba98d11

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

modules/ROOT/partials/configuration/external_plugins.adoc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
[[external_plugins]]
22
== `+external_plugins+`
33

4-
This option allows a URL based location of plugins to be provided that are outside of the normal {productname} plugins directory.
4+
This option allows plugins to be loaded from outside the default {productname} plugins directory. {productname} will attempt to load these plugins as usual when starting up, provided the required files exist.
55

6-
{productname} will attempt to load these as per regular plugins when starting up. This option is useful when loading {productname} from a CDN or when the {productname} directory is separate from custom plugins.
6+
This can be useful when:
77

8-
This value should be set as a JavaScript object that contains a property for each {productname} plugin to be loaded. This property should be named after the plugin and should have a value that contains the location that the plugin that will be loaded from.
8+
* Using custom plugins.
9+
* Loading {productname} from a CDN but not the plugins.
10+
* Loading premium plugins from the tinymce-premium NPM package, without bundling or file stacking.
11+
* Loading plugins from any location separate to the core {productname} files.
12+
13+
This option takes an object which contains `+key-value+` pairs of plugin names and the location their JavaScript file should be loaded from as a URL.
914

1015
The URLs provided can be:
1116

@@ -22,9 +27,11 @@ The URLs provided can be:
2227
tinymce.init({
2328
selector: 'textarea', // change this value according to your HTML
2429
external_plugins: {
25-
'testing': 'http://www.testing.com/plugin.min.js',
26-
'maths': 'http://www.maths.com/plugin.min.js'
27-
}
30+
'customplugin': 'https://cdn.example.com/customplugin/plugin.min.js',
31+
'advcode': '/<path_to_tinymce-premium>/plugins/advcode/plugin.min.js'
32+
},
33+
plugins: 'customplugin advcode',
34+
// ... other configuration
2835
});
2936
----
3037

0 commit comments

Comments
 (0)