Skip to content

Commit 733386a

Browse files
authored
Update modules/ROOT/partials/configuration/crossorigin.adoc
1 parent 45f7b2c commit 733386a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

modules/ROOT/partials/configuration/crossorigin.adoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ The `+crossorigin+` option controls how {productname} handles cross-origin resou
2020

2121
[source,js]
2222
----
23-
tinymce.init({
24-
selector: "textarea",
25-
crossorigin: (url, resourceType) => {
23+
const crossOriginFunction = (url, resourceType) => {
2624
// Returning 'anonymous' or 'use-credentials' here would explicitly set the attribute
2725
return 'anonymous';
2826
// return 'use-credentials';
29-
// return undefined; // Omit the 'crossorigin' attribute for all resources by returning undefined
30-
},
27+
// return undefined; // Omits the 'crossorigin' attribute for all resources by returning undefined
28+
};
29+
30+
tinymce.init({
31+
selector: "textarea",
32+
crossorigin: crossOriginFunction
3133
});
3234
----
3335

0 commit comments

Comments
 (0)