-
Notifications
You must be signed in to change notification settings - Fork 368
Custom configuration from scope variable not working #158
Comments
I have the same problem. I'm using default configuration (set using angular.value('uiTinymceConfig') but I need to overwrite it in one case. |
Same issue. It seems to be due to the fact that in certain situations the attribute for uiTinymce options doesn't eval immediately, the current code looks like this:
So when the above $timeout method is fired "options" won't contain your custom options as "expression" has already been evaluated as undefined. The workaround that seems to work for my case: move the $eval and extend calls into the $timeout also.
|
I have this issue as well, +1 for fix. |
As a short term solution for people having this issue, you can wrap the usage of ui-tinymce in a parent element which has an ng-if watching the scope variable which contains your options. Not a good solution but a short term hack... |
I was hit by this too. But placing the two angular.extend(..) calls inside $timeout() as suggested by https://github.com/sato-sh earlier in this thread, seems to fix the problem. |
Im still having this issue... using ui-tinymce 0.16 trying to set the options inside my directive
any idea what Im doing wrong? tried with ng-if and did not help, also added timeout and nothing |
When I use an actual scope to insert the configuration options for uiTinymceConfig in tinymceOptions and it doesn't work unless I put the object INLINE in the directive. Anyone else seeing this? I'm using Angular 1.2.26 and my options are being fed in on instantiation of the directive, but I can confirm that it's not being parsed.
This line doesn't eval right away with my inputted in values. If I put a $timeout of 100ms around it, it then evaluates correctly.
Anyone else having this issue? I need to add a color picker and other stuff here, but I don't see a working example of this functionality, just sample code.
Thanks
The text was updated successfully, but these errors were encountered: