Skip to content

Commit dd8a4e7

Browse files
committed
DOC-3329: Remove theme option, re-feactor editor-theme.adoc and improve bundling-plugins.adoc structure.
1 parent a101b9e commit dd8a4e7

File tree

5 files changed

+48
-36
lines changed

5 files changed

+48
-36
lines changed

modules/ROOT/pages/bundling-plugins.adoc

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,24 @@
33
:description_short: Information on bundling plugins
44
:description: Information on bundling TinyMCE plugins using module loading
55

6+
== Overview
7+
8+
{productname} plugins can be bundled using module loaders such as Webpack, Rollup, or Vite. This guide covers how to include both community and premium plugins in your application bundle.
9+
10+
{productname} includes both community and premium plugins:
11+
12+
* **Community plugins**: Available with all {productname} installations
13+
* **Premium plugins**: Available with paid {productname} subscriptions via the `+tinymce-premium+` package
14+
615
:editorcomponent: plugin
716
include::partial$module-loading/bundling-ref-example.adoc[]
817
:!editorcomponent:
918

1019
include::partial$plugin-files/plugin-file-index.js.adoc[]
1120

21+
== Bundling syntax examples
1222

13-
Example syntax for including the example "<plugincode>" plugin in a bundle using `content.js`for bundling:
23+
The following examples show the syntax for including plugins in a bundle. The examples use a placeholder `+<plugincode>+` to represent any plugin name:
1424

1525
[cols='1,2,3']
1626
|===
@@ -81,27 +91,28 @@ require('<path_to_tinymce_premium_zip>/plugins/<plugincode>');
8191

8292
After installing the `+tinymce-premium+` package, you need to configure the plugins in your editor. There are two main approaches:
8393

84-
=== License key manager
85-
8694
[IMPORTANT]
8795
====
88-
Remember to include the `+licensekeymanager+` plugin when using premium plugins with a commercial license. The editor will not function properly without it. For more information, see: xref:license-key.adoc[License Key].
89-
====
96+
*License Key Manager Requirement:*
9097
91-
When bundling:
98+
When using premium plugins with a commercial license, you must include the `+licensekeymanager+` plugin. The editor will not function properly without it. For more information, see: xref:license-key.adoc[License Key].
99+
100+
*xref:bundling-plugins.adoc#bundling-recommended[When bundling]:*
92101
[source,js]
93102
----
94103
import 'tinymce-premium/plugins/licensekeymanager';
95104
----
96105
97-
When using `+external_plugins+`:
106+
*xref:bundling-plugins.adoc#using-external-plugins[When using `+external_plugins+`]:*
98107
[source,js]
99108
----
100109
external_plugins: {
101110
'licensekeymanager': '<path_to_premium_plugins>/licensekeymanager/plugin.min.js'
102111
}
103112
----
113+
====
104114

115+
[[bundling-recommended]]
105116
=== Bundling (Recommended)
106117

107118
For most modern applications, bundling premium plugins is recommended. This includes the plugin code directly in your application bundle.
@@ -130,6 +141,7 @@ tinymce.init({
130141

131142
For complete bundling examples, see the <<premium-plugins,Premium plugins>> and <<community-plugins,Community plugins>> sections below.
132143

144+
[[using-external-plugins]]
133145
=== Using external_plugins (Non-bundling)
134146

135147
When bundling is not available or you want to lazy-load plugins, use the `+external_plugins+` option:
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
= {productname} Theme options
22
:navtitle: Themes
33
:description: Configure the editor's theme.
4+
:keywords: theme, silver, theme_url
45

5-
WARNING: {companyname} does not recommend creating custom themes. The default `+silver+` theme provides the editor user interface components such as buttons, dialogs, and menus. To change the editor appearance, customize the skin, icons, and other user interface elements such as the toolbar.
6+
== Overview
67

7-
include::partial$configuration/theme.adoc[]
8+
{productname} breaks the core editor into several parts to optimize load times. The theme provides the editor UI-related logic and components such as buttons, dialogs, and menus. The currently supported theme, "Silver", is automatically loaded unless its files are missing from the core {productname} distribution or are hosted separately.
89

9-
include::partial$configuration/theme_url.adoc[]
10+
11+
include::partial$configuration/theme_url.adoc[leveloffset=+1]

modules/ROOT/partials/configuration/theme.adoc

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
11
[[theme_url]]
22
== `+theme_url+`
33

4-
If you are using {productname} themes, this option enables you to specify the location of the theme file. This is useful if you are loading {productname} from one URL, for example a CDN, while loading a theme on, say, a local server.
4+
This option allows you to specify a custom location for the theme files. Use this option **only** when you need to load the theme files from a location that is not bundled with the core {productname} distribution. The current supportedtheme is called *Silver*.
55

66
*Type:* `+String+`
77

8-
=== Example: using `+theme_url+`
8+
9+
[NOTE]
10+
====
11+
The `+theme_url+` option should only be used in specific deployment scenarios:
12+
13+
**CDN Loading:**
14+
15+
When loading the theme files from a CDN or external server while {productname} core files are loaded from a different location:
16+
17+
[source,js]
18+
----
19+
tinymce.init({
20+
selector: 'textarea',
21+
theme_url: 'https://cdn.example.com/tinymce/themes/silver/theme.min.js'
22+
});
23+
----
24+
25+
**Custom Deployment Structure:**
26+
27+
During development or when using a custom deployment structure where the theme files are in different directories:
928
1029
[source,js]
1130
----
1231
tinymce.init({
13-
selector: 'textarea', // change this value according to your HTML
14-
theme_url: '/mytheme/mytheme.js'
32+
selector: 'textarea',
33+
theme_url: '<path_to_tinymce_theme>/themes/silver/theme.min.js'
1534
});
1635
----
36+
====

modules/ROOT/partials/install/upgrading-info.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ tinymce/
109109
* Custom icons packs
110110
* Custom plugins
111111
* Custom skins
112-
* Custom themes
113112
. Delete the existing `{prodnamecode}/` directory and replace with the new `{prodnamecode}/`.
114113

115114
[NOTE]
@@ -123,5 +122,4 @@ To simplify the upgrade process to future versions of {productname}:
123122
* Set the location of custom icon packages using xref:editor-icons.adoc#icons_url[`+icons_url+`] instead of `+icons+`.
124123
* Set the location of custom localization packages using xref:ui-localization.adoc#language_url[`+language_url+`] instead of `+language+`.
125124
* Set the location of custom skin packages using xref:editor-skin.adoc#skin_url[`+skin_url+`] instead of `+skin+`.
126-
* Set the location of custom themes using xref:editor-theme.adoc#theme_url[`+theme_url+`] instead of `+theme+`.
127125
====

0 commit comments

Comments
 (0)