angular-ui / ui-tinymce

AngularUI wrapper for TinyMCE
MIT License
488 stars 371 forks source link

baseURL does not work for asset loading #199

Closed brianharwell closed 8 years ago

brianharwell commented 8 years ago

I tried specifying the baseURL on the config object and it was not respected. I got loading errors because tinymce was looking for assets in a relative directory. To fix this I had to explicitly set the baseURL before calling init.

$timeout(function () { tinymce.baseURL = options.baseURL; // I HAD TO ADD THIS LINE tinymce.init(options); toggleDisable(scope.$eval(attrs.ngDisabled)); });

deeg commented 8 years ago

Thanks for posting. If you have time could you please post a Plunker demonstrating the issue.

I will start looking into the issue this week.

brianharwell commented 8 years ago

http://plnkr.co/edit/cDwBF2?p=preview

Uncomment line 112 in the tinymce.js file and the files will attempt to load from an alternate location. Check your browser's console window.

deeg commented 8 years ago

Thanks for posting Plunker.

I want to look at this later tonight to make sure that is the correct place/way to fix it, but your fix looks good.

If you would like to post a pull request following the contributing guidelines posted here I am happy to get this merged in ASAP. If you do not have time I can hopefully make the changes later tonight.

Jakobovski commented 8 years ago

Hi deeg. I have created a PR for this bug. If possible please merge into master soon as I am waiting for this fix before I can put some code into production. Thanks for the awesome repo!

deeg commented 8 years ago

Sorry, I started looking at this last night after a few other issues and got distracted. I plan to pick it back up tonight. In the mean time I will comment on the PR so we can get it merged in.

Jakobovski commented 8 years ago

@deeg. Any updates on this merge?

brianharwell commented 8 years ago

Considering the holidays and the fix is literally one line of code, @Jakobovski just make the modification locally so your deployment isn't held up.

deeg commented 8 years ago

Fixed by 17243a404297f881cf78d654beaef0fb15875fcd