Skip to content

Commit b845996

Browse files
kemister85ltroutontiny-ben-tran
authored
Apply suggestions from code review
Co-authored-by: ltrouton <[email protected]> Co-authored-by: tiny-ben-tran <[email protected]>
1 parent d16fa32 commit b845996

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

modules/ROOT/partials/configuration/external_plugins-premium-npm.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ tinymce.init({
5353
selector: 'textarea',
5454
base_url: '/tinymce', // TinyMCE location
5555
external_plugins: {
56-
'advcode': '../../node_modules/tinymce-premium/plugins/advcode/plugin.min.js',
57-
'licensekeymanager': '../../node_modules/tinymce-premium/plugins/licensekeymanager/plugin.min.js',
58-
'tinycomments': '../../node_modules/tinymce-premium/plugins/tinycomments/plugin.min.js'
56+
'advcode': 'tinymce-premium/plugins/advcode/plugin.min.js',
57+
'licensekeymanager': 'tinymce-premium/plugins/licensekeymanager/plugin.min.js',
58+
'tinycomments': 'tinymce-premium/plugins/tinycomments/plugin.min.js'
5959
},
6060
plugins: 'advcode tinycomments',
6161
// ... other configuration

modules/ROOT/partials/configuration/language_url.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can find and download languages link:{gettiny}/language-packages/[here].
4545

4646
=== Example: loading premium languages from `+tinymce-premium+` (NPM)
4747

48-
When installing the `+tinymce-premium+` NPM package, each paid translation is stored in `+node_modules/tinymce-premium/langs/+`. Configure `+language_url+` to point at the desired file.
48+
When installing the `+tinymce-premium+` NPM package, each translation is stored in `+node_modules/tinymce-premium/langs/+`. Configure `+language_url+` to point at the desired file.
4949

5050
.Example
5151
[source,js]
@@ -59,6 +59,6 @@ tinymce.init({
5959

6060
[NOTE]
6161
====
62-
* Ensure the `+node_modules+` directory (or a copy of the language file) is accessible to the browser. Many projects copy the required file into a public folder (such as `+/public/langs/pt_BR.js+`) during their build step and update `+language_url+` accordingly.
62+
* Ensure the language file is accessible in the application. Many projects copy the required file into a static assets folder (such as `+/public/langs/pt_BR.js+`) during their build step.
6363
* Combine this with the approaches listed in xref:ui-localization.adoc#premium-language-packs-npm[Providing premium language packs from `+tinymce-premium+`] to match the deployment strategy.
6464
====

modules/ROOT/partials/configuration/skin_url.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ tinymce.init({
1919

2020
=== Example: loading premium skins from `+tinymce-premium+` (NPM)
2121

22-
When installing the `+tinymce-premium+` NPM package, premium skins are stored in `+node_modules/tinymce-premium/skins/ui/+`. Configure the `+skin_url+` to point at the desired skin directory. For example:
22+
Configure the `+skin_url+` to point at the appropriate location. For example:
2323

2424
[source,js]
2525
----
2626
tinymce.init({
2727
selector: 'textarea',
28-
skin_url: '/node_modules/tinymce-premium/skins/ui/fabric'
28+
skin_url: '/<path_to_premium_skins>/ui/fabric'
2929
});
3030
----
3131

3232
[NOTE]
3333
====
34-
* Ensure the `+node_modules+` directory (or a copy of the skin directory) is accessible to the browser. Many projects copy the required skin into a public folder (such as `+/public/skins/ui/oxide+`) during their build step and update `+skin_url+` accordingly.
34+
* Ensure the skin directory is accessible to the application. Many projects copy the required skin into a static assets folder (such as `+/public/skins/ui/oxide+`) during their build step.
3535
* Combine this with the approaches listed in xref:bundling-skins.adoc#premium-skins-npm[Premium skins from `+tinymce-premium+`] to match the deployment strategy.
3636
====

modules/ROOT/partials/install/npm-premium-plugins-install.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ For information on obtaining a license key, see: xref:license-key.adoc[License K
3636

3737
After installing `+tinymce-premium+`, you need to:
3838

39-
* Import or configure the premium plugins (see options below)
39+
* Import or configure to include the premium plugins (see options below)
4040
* Add the plugins to your editor's `+plugins+` configuration
4141
* Set your commercial `+license_key+` in the editor initialization
4242
4343
[NOTE]
4444
====
45-
When bundling, you import individual premium plugins (e.g., `+import 'tinymce-premium/plugins/advcode'+`), not the package itself. You do **not** need `+import tinymcePremium from 'tinymce-premium'+` - only import the specific plugins you need.
45+
When bundling, you can only import premium plugins individually (e.g., `+import 'tinymce-premium/plugins/advcode'+`). You can **not** include `+import 'tinymce-premium'+` - only import the specific plugins you need.
4646
====
4747

4848
For complete examples, see the integration guides for your specific framework.

modules/ROOT/partials/integrations/angular-quick-start.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ import { EditorComponent, TINYMCE_SCRIPT_SRC } from '@tinymce/tinymce-angular';
130130
+
131131
[NOTE]
132132
====
133-
When using `+TINYMCE_SCRIPT_SRC+` to lazy load TinyMCE, you cannot import premium plugins directly. Premium plugins must be bundled with your application. For instructions on bundling TinyMCE with premium plugins, see: xref:angular-pm-bundle.adoc[Bundling with Angular].
133+
When using `+TINYMCE_SCRIPT_SRC+` to lazy load TinyMCE, you can not import premium plugins directly. This will trigger a `tinymce not defined` error in your application because the plugins need to access `tinymce` global variable which doesn't exist at that time.
134134
====
135135
* To load {productname} when the page or application is loaded:
136136
.. Open `+angular.json+` and add {productname} to the _global scripts_ tag.

0 commit comments

Comments
 (0)