Skip to content

Commit 764dfa1

Browse files
committed
DOC-3233: Add release notes entry for new crossorigin option, and updated script_crossorigin.adoc partial to provide examples.
1 parent 9297b6e commit 764dfa1

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

modules/ROOT/pages/8.0-release-notes.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,23 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
104104

105105
// CCFR here.
106106

107+
=== ScriptLoader cross-origin attribute support
108+
109+
Added configurable cross-origin attribute support to ScriptLoader. This improvement allows setting the `crossorigin` attribute for script loading, which is particularly important for {productname} Cloud deployments where browsers or security software might interfere with Referer headers. The new `crossorigin` option supports values such as "anonymous", following the same pattern as the existing `referrer_policy` option.
110+
111+
This improvement is especially relevant for {productname} {release-version} users utilizing {companyname} Cloud, as it ensures consistent loading behavior for both the main {productname} script and plugins when browsers or security software (like Norton Antivirus) interfere with Referer headers.
112+
113+
Example configuration:
114+
[source,js]
115+
----
116+
tinymce.init({
117+
selector: 'textarea',
118+
crossorigin: 'anonymous'
119+
});
120+
----
121+
122+
For more details, see the xref:tinymce-and-cors.adoc[ScriptLoader cross-origin attribute support] section.
123+
107124

108125
[[additions]]
109126
== Additions

modules/ROOT/partials/configuration/script_crossorigin.adoc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,34 @@ For a list of valid crossorigin values, see: link:https://developer.mozilla.org/
1919
----
2020

2121
NOTE: Both the `+referrerpolicy="origin"+` and `+crossorigin="anonymous"+` attributes are required when loading {productname} from {cloudname}. These work together to ensure proper domain validation and secure cross-origin resource loading.
22+
23+
== Configuration Option: `+crossorigin+`
24+
25+
If using {productname} 8 or later, configure the `+crossorigin+` attribute for dynamically loaded scripts via the ScriptLoader. This is particularly useful when loading plugins or other resources that require cross-origin requests.
26+
27+
*Type:* `+String+`
28+
29+
*Default value:* `+''+`
30+
31+
*Possible values:* `+'anonymous'+`, `+'use-credentials'+`, `+''+`
32+
33+
=== Example: Using the configuration option
34+
35+
[source,js]
36+
----
37+
tinymce.init({
38+
selector: 'textarea',
39+
crossorigin: 'anonymous' // Applied to all scripts loaded via ScriptLoader
40+
});
41+
----
42+
43+
[TIP]
44+
====
45+
* When using {cloudname}, setting `+crossorigin="anonymous"+` in the configuration ensures consistent behavior between the main script and dynamically loaded plugins.
46+
* The value set in the configuration applies to all resources loaded through ScriptLoader.
47+
* Using `+'anonymous'+` sends the Origin header without credentials.
48+
* Using `+'use-credentials'+` sends the Origin header with credentials, which is **not** recommended for most use cases.
49+
* An empty string or omitting the option will not set the crossorigin attribute on dynamically loaded scripts.
50+
====
51+
52+
For more details on the crossorigin attribute, see: link:https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin[MDN Web Docs - HTML attribute: crossorigin].

0 commit comments

Comments
 (0)