Skip to content

DOC-3367: Add new bundling guide overview page.#3983

Open
kemister85 wants to merge 1 commit intotinymce/8from
hotfix/8/DOC-3367
Open

DOC-3367: Add new bundling guide overview page.#3983
kemister85 wants to merge 1 commit intotinymce/8from
hotfix/8/DOC-3367

Conversation

@kemister85
Copy link
Contributor

@kemister85 kemister85 commented Feb 12, 2026

Ticket: DOC-3367

Site: New: Bundling guide (page)

Summary

Adds a new bundling overview guide and improves bundling documentation consistency across the codebase.

Changes

New Files

  • modules/ROOT/pages/bundling-guide.adoc - New bundling overview page providing:
    • Overview of bundling TinyMCE with module bundlers (Webpack, Vite, Rollup, Browserify)
    • Required imports (TinyMCE core, silver theme, dom model, default icons, skins, content CSS)
    • Plugin import syntax for community and premium plugins
    • Plugin gotchas (plugins requiring additional resources, plugin dependencies)
    • CSS files information
    • Language files information
    • Links to all related bundling reference pages
  • 60 plugin feature pages - Added include::partial$misc/bundling-guide-link.adoc[] to all core and premium plugins.

Pre-checks:

  • Branch prefixed with feature/<version>/, hotfix/<version>/, staging/<version>/, or release/<version>/.
  • modules/ROOT/nav.adoc has been updated (if applicable).

Review:

  • Documentation Team Lead has reviewed

@kemister85 kemister85 requested review from a team, jscasca, kimwoodfield, metricjs, soritaheng and tiny-ben-tran and removed request for a team February 12, 2026 00:13
@kemister85 kemister85 marked this pull request as ready for review February 12, 2026 00:13
@kemister85 kemister85 requested a review from a team as a code owner February 12, 2026 00:13

== Plugin gotchas

Some plugins require additional resource files (JS, CSS, or language files) to function properly. These must be explicitly imported when bundling:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Some plugins require additional resource files (JS, CSS, or language files) to function properly. These must be explicitly imported when bundling:
Some plugins require additional resource files (JS, CSS, or language files) to function properly. These must be explicitly imported when bundling.

?


* Core plugin resources typically use relative paths without file extensions
* Premium plugin resources (from `+tinymce-premium+`) MUST include the `.js` or `.css` file extension in the import path
* Plugins lazy-load additional resources at runtime, so these files must be included in the bundle or accessible as static assets
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Some plugins" or "plugins may" - to not cause panic that every plugin pulls in more resources?

Key points about plugin resources:

* Core plugin resources typically use relative paths without file extensions
* Premium plugin resources (from `+tinymce-premium+`) MUST include the `.js` or `.css` file extension in the import path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see this noted in Sorita's notes and wasn't aware it was a thing - sanity checking where this comes from?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, was this from her examples for the lang files?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we may not need to include this. An integrator could follow their own import styles, so long as their bundler is configured properly to resolve the file extensions. The choices in the example code were mainly to ensure it would work for the majority out of the box.


== CSS files

Plugin CSS files are typically included automatically when importing plugins. However, some plugins may require explicit CSS imports for proper styling.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Plugin CSS files are typically included automatically when importing plugins. However, some plugins may require explicit CSS imports for proper styling.
Some plugins require additional CSS files. Plugin CSS files are included automatically when importing plugins via their JS file.

or something? from what Sorita said, should never need to pull in a CSS file manually

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, there aren't any plugins that require a CSS import, and if it does, then it would likely require a fix - as in the case for Uploadcare.

Language files are optional and used for localizing the {productname} UI and plugin interfaces.

=== Core UI language files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For community packages:

[NOTE]
====
* English is the default language, so `+en.js+` language files don't exist
* For premium plugins, the language file path must include the `.js` extension
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the examples here, it looks like the .js is always required, whether premium or community? @soritaheng any thoughts?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most bundlers support resolving file extensions, so they are not necessarily required. For example, in Vite. Since the order of the resolution could be configured, I went with the extensions in the examples for clarity's sake. But let me know if that should be reconsidered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants