Skip to content

Commit

Permalink
fix: update URL of the CDN for the JS resource (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Nov 28, 2023
1 parent 2b7e99c commit 653e201
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/configuration.md
Expand Up @@ -34,9 +34,10 @@ DEFAULT = {
If you are using a custom TinyMCE configuration, don't forget to add [spellchecker](https://www.tinymce.com/docs/plugins/spellchecker/) plugin to your configuration, and add the necessary menu item/toolbar button. Also read [Language Configuration](#language-configuration) subsection about how to configure the spellchecker.
```

`TINYMCE_JS_URL` -- a path to TinyMCE JavaScript library. Default: {file}`{your_static_url}/tinymce/js/tinymce/tinymce.min.js`. The following example shows how to load the TinyMCE library from a CDN:
`TINYMCE_JS_URL` -- a path to TinyMCE JavaScript library. Default: `https://cdn.tiny.cloud/1/no-api-key/tinymce/4/tinymce.min.js`.
The following example shows how to load the TinyMCE library from another location:

TINYMCE_JS_URL = '//cdn.tinymce.com/4/tinymce.min.js'
TINYMCE_JS_URL = 'https://cdn.tiny.cloud/1/no-api-key/tinymce/4/tinymce.min.js'

`TINYMCE_ADDITIONAL_JS_URLS` -- a {class}`list` of URLs for additional JavaScript files to be used with the TinyMCE widget, for example, custom TinyMCE plugins. Default: None.

Expand Down
6 changes: 5 additions & 1 deletion src/tinymce/settings.py
Expand Up @@ -37,7 +37,11 @@
CONFIG = getattr(settings, "TINYMCE_DEFAULT_CONFIG", DEFAULT)

# TinyMCE 4 JavaScript code
JS_URL = getattr(settings, "TINYMCE_JS_URL", "//cdn.tinymce.com/4/tinymce.min.js")
JS_URL = getattr(
settings,
"TINYMCE_JS_URL",
"https://cdn.tiny.cloud/1/no-api-key/tinymce/4/tinymce.min.js",
)

# Additional JS files for TinyMCE (e.g. custom plugins)
ADDITIONAL_JS_URLS = getattr(settings, "TINYMCE_ADDITIONAL_JS_URLS", None)
Expand Down

0 comments on commit 653e201

Please sign in to comment.