-
Notifications
You must be signed in to change notification settings - Fork 220
DOC-3367: Add new bundling guide overview page. #3983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
097dc65
DOC-3367: Add new bBundling guide overview page.
kemister85 2100b71
DOC-3367: Copy edits and suggestions.
kemister85 207f486
Update modules/ROOT/pages/bundling-guide.adoc
kemister85 6e0185a
Update modules/ROOT/pages/bundling-guide.adoc
kemister85 7f460c6
Merge tinymce/8 into hotfix/8/DOC-3367
kemister85 9b13ca6
DOC-3367: Suggested improvement changes.
kemister85 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,176 @@ | ||
| = Bundling {productname} - Overview | ||
| :navtitle: Bundling overview | ||
| :description_short: Overview of bundling TinyMCE with module bundlers | ||
| :description: Overview of bundling TinyMCE with module bundlers including required imports, plugins, and resources | ||
| :keywords: bundling, webpack, vite, rollup, modules, imports, es6, commonjs | ||
|
|
||
| This guide provides an overview of bundling {productname} with module bundlers such as Webpack, Vite, Rollup, or Browserify. For bundler-specific setup instructions, see xref:introduction-to-bundling-tinymce.adoc[Introduction to bundling {productname}]. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| When using {cloudname}, dependencies and additional resources are automatically loaded. The information below applies to self-hosted installations using NPM or ZIP packages. All examples in this guide use NPM package import paths. | ||
| ==== | ||
|
|
||
| == Module syntax support | ||
|
|
||
| {productname} supports both ES6 modules and CommonJS modules: | ||
|
|
||
| * **ES6 modules**: Use `+import+` statements (shown in all documentation examples) | ||
| * **CommonJS modules**: Use `+require()+` statements | ||
|
|
||
| Both syntaxes are supported, but this documentation uses ES6 module syntax in all examples. | ||
|
|
||
| == Required imports | ||
|
|
||
| include::partial$module-loading/bundling-required-components.adoc[] | ||
kemister85 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| === Example: Basic recommended imports | ||
|
|
||
| [source,js] | ||
| ---- | ||
| /* Import TinyMCE */ | ||
| import tinymce from 'tinymce'; | ||
|
|
||
| /* Default icons are required */ | ||
| import 'tinymce/icons/default'; | ||
|
|
||
| /* Required TinyMCE components */ | ||
| import 'tinymce/themes/silver'; | ||
| import 'tinymce/models/dom'; | ||
|
|
||
| /* Import a skin (oxide is the default) */ | ||
| import 'tinymce/skins/ui/oxide/skin.js'; | ||
| import 'tinymce/skins/ui/oxide/content.js'; | ||
|
|
||
| /* Content CSS for editor content styling */ | ||
| import 'tinymce/skins/content/default/content.js'; | ||
kemister85 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ---- | ||
|
|
||
| For more information on: | ||
|
|
||
| * Icons, see xref:bundling-icons.adoc[Bundling icons] | ||
| * Themes, see xref:bundling-themes.adoc[Bundling themes] | ||
| * Models, see xref:bundling-models.adoc[Bundling models] | ||
| * Skins, see xref:bundling-skins.adoc[Bundling skins] | ||
kemister85 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * Content CSS, see xref:bundling-content-css.adoc[Bundling content CSS] | ||
|
|
||
| == Importing plugins | ||
|
|
||
| Most plugins can be imported directly using their plugin code. The import path depends on whether the plugin is a community or premium plugin: | ||
|
|
||
| === Community plugins | ||
kemister85 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [source,js] | ||
| ---- | ||
| import 'tinymce/plugins/<plugincode>'; | ||
| ---- | ||
|
|
||
| === Premium plugins | ||
|
|
||
| [source,js] | ||
| ---- | ||
| import 'tinymce-premium/plugins/<plugincode>'; | ||
| ---- | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| When using premium plugins with a commercial license, you must include the `+licensekeymanager+` plugin: | ||
|
|
||
| [source,js] | ||
| ---- | ||
| import 'tinymce-premium/plugins/licensekeymanager'; | ||
| ---- | ||
|
|
||
| For more information, see xref:bundling-plugins.adoc#using-premium-plugins[Using premium plugins]. | ||
| ==== | ||
|
|
||
| For detailed information on bundling plugins, see xref:bundling-plugins.adoc[Bundling plugins]. | ||
|
|
||
| == Plugin gotchas | ||
|
|
||
| Some plugins require additional resource files (JS, CSS, or language files) to function properly. These must be explicitly imported when bundling: | ||
kemister85 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| === Plugins requiring additional resources | ||
|
|
||
| * **Emoticons**: Requires an emoji database file (`+js/emojis.js+`) | ||
| * **Help**: Requires a keyboard navigation language file (`+js/i18n/keynav/<lang>.js+`) | ||
| * **Autocorrect**: Requires a word list file (`+js/en.js+`) | ||
| * **Uploadcare**: Requires a webcomponent file (`+js/uc-video.js+`) | ||
|
|
||
| For specific import examples, see xref:bundling-plugins.adoc#plugin-resources[Additional plugin resources]. | ||
|
|
||
| === Plugin dependencies | ||
|
|
||
| Some plugins depend on other plugins. For example: | ||
|
|
||
| * The `+advtable+` plugin requires the `+table+` plugin | ||
|
|
||
| Always import dependent plugins before the plugin that requires them. For a full list of plugin dependencies, see each plugin's documentation page. | ||
|
|
||
| == CSS files | ||
|
|
||
| Some plugins require additional CSS files. Plugin CSS files are included automatically when importing plugins via their JS file. | ||
|
|
||
| When using skins, you must import both: | ||
|
|
||
| * The skin CSS file (`+skin.css+` or `+skin.js+`) | ||
| * The content skin CSS file (`+content.css+` or `+content.js+`) | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| Importing the `+skin.js+` and `+content.js+` files is an alternative way to load skin styles besides CSS imports. For bundlers like Webpack and Browserify that require additional setup to support CSS imports, the CSS examples in xref:bundling-skins.adoc[Bundling skins] remain valid. | ||
| ==== | ||
|
|
||
| For more information, see xref:bundling-skins.adoc[Bundling skins]. | ||
|
|
||
| == Language files | ||
|
|
||
| Language files are optional and used for localizing the {productname} UI and plugin interfaces. | ||
|
|
||
| === Core UI language files | ||
|
|
||
kemister85 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| For community packages: | ||
|
|
||
| [source,js] | ||
| ---- | ||
| import 'tinymce/langs/<language>.js'; | ||
| ---- | ||
|
|
||
| For premium packages: | ||
|
|
||
| [source,js] | ||
| ---- | ||
| import 'tinymce-premium/langs/<language>.js'; | ||
| ---- | ||
|
|
||
| === Plugin language files | ||
|
|
||
| Plugin language files are separate from the main UI language files. The editor's `+language+` option must be set to the desired language for the plugin's language file to take effect. | ||
|
|
||
| [source,js] | ||
| ---- | ||
| // Community plugin language file | ||
| import 'tinymce/plugins/<plugincode>/langs/<language>.js'; | ||
|
|
||
| // Premium plugin language file | ||
| import 'tinymce-premium/plugins/<plugincode>/langs/<language>.js'; | ||
| ---- | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| * US English is the default language, so the language packs do not include `+en.js+` language files (see xref:ui-localization.adoc#language[`+language+` option]). Note that the Help and Autocorrect plugins have their own `+en.js+` files. | ||
| * Examples include the `.js` extension for clarity; most bundlers can resolve file extensions automatically. | ||
| ==== | ||
|
|
||
| For more information, see xref:bundling-localization.adoc[UI localizations]. | ||
|
|
||
| == Next steps | ||
|
|
||
| * xref:introduction-to-bundling-tinymce.adoc[Introduction to bundling {productname}] - Bundler-specific guides | ||
| * xref:bundling-themes.adoc[Bundling themes] - Theme configuration and customization | ||
| * xref:bundling-models.adoc[Bundling models] - Model configuration | ||
| * xref:bundling-plugins.adoc[Bundling plugins] - Detailed plugin bundling information | ||
| * xref:bundling-skins.adoc[Bundling skins] - Skin configuration and customization | ||
| * xref:bundling-icons.adoc[Bundling icons] - Icon pack configuration | ||
| * xref:bundling-content-css.adoc[Content CSS] - Content styling configuration | ||
| * xref:bundling-localization.adoc[UI localizations] - Language file configuration | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.