Skip to content

Commit

Permalink
feat: allow the ability to configure a path when self-hosting (bundli…
Browse files Browse the repository at this point in the history
…ng) tinymce
  • Loading branch information
hero-david committed Apr 16, 2024
1 parent 6d2fe61 commit 0baa082
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = function(/* environment, appConfig */) {
load: true,
apiKey: 'no-api-key',
version: '6.3.1-12',
sriHash: ''
sriHash: '',
selfHostedPath: ''
}
};
};
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ module.exports = {
let content = '';

if (type === 'head-footer' && config['tinyMCE'] && config['tinyMCE']['load']) {
let src = `https://cdn.tiny.cloud/1/${config['tinyMCE']['apiKey']}/tinymce/${config['tinyMCE']['version']}/tinymce.min.js`;

let src = '';
if (config['tinyMCE']['selfHostedPath'] !== '') {
src = config['tinyMCE']['selfHostedPath']
} else {
src = `https://cdn.tiny.cloud/1/${config['tinyMCE']['apiKey']}/tinymce/${config['tinyMCE']['version']}/tinymce.min.js`;
}

let sriHash = '';
if (config['tinyMCE']['sriHash'] !== '') {
Expand Down

0 comments on commit 0baa082

Please sign in to comment.