Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 1590334

Browse files
committed
Add optional support for global tinymce asset loading url
Closes #44
1 parent da10af3 commit 1590334

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ In addition, it supports these additional optional options
7676
- `format` Format to get content as, i.e. 'raw' for raw HTML, or 'text' for text only. Documentation [here](http://www.tinymce.com/wiki.php/api4:method.tinymce.Editor.getContent)
7777
- `trusted` When `true`, all TinyMCE content that is set to `ngModel` will be whitelisted by `$sce`
7878

79+
This option is only supported when present on the `uiTinymceConfig` global injectable - this injectable needs to be an object.
80+
81+
- `baseUrl` Sets the base url used by tinymce asset loading
82+
7983
```javascript
8084
myAppModule.controller('MyController', function($scope) {
8185
$scope.tinymceOptions = {

src/tinymce.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ angular.module('ui.tinymce', [])
77
uiTinymceConfig = uiTinymceConfig || {};
88
var generatedIds = 0;
99
var ID_ATTR = 'ui-tinymce';
10+
if (uiTinymceConfig.baseUrl) {
11+
tinymce.baseURL = uiTinymceConfig.baseUrl;
12+
}
13+
1014
return {
1115
require: ['ngModel', '^?form'],
1216
link: function(scope, element, attrs, ctrls) {

0 commit comments

Comments
 (0)