You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is some help for people who get this undefined 'font-styles' error. As best I can tell this is caused by an incompatiblity of the bootstrap3-wysiwyg package with some JS loaders. In my case the loader is SystemJS. I solved the problem by switching to this fork: https://github.com/sharathprabhal/bootstrap3-wysiwyg-commonjs
In my case switching to that fork also required adding the handlebars package as an explicit dependency for my project.
The implication is that the code in this bootstrap3-wysiwyg repository is not CommonJS compliant. See issue, #166.
Regarding the actual nature of the error message it looks to me like this package has a more-or-less global variable called wysihtml5 that gets split into two separate scopes when loaded by SystemJS. The 'font-styles' handlebars template is defined using the tpl property in the first scope but later looked up in the second scope where the tpl template property was never defined.
I suspect that when the .js file from this project is loaded directly from a script directive in html (instead of via SystemJS) the two scopes are one in the same.
The text was updated successfully, but these errors were encountered:
Here is some help for people who get this undefined 'font-styles' error. As best I can tell this is caused by an incompatiblity of the bootstrap3-wysiwyg package with some JS loaders. In my case the loader is SystemJS. I solved the problem by switching to this fork: https://github.com/sharathprabhal/bootstrap3-wysiwyg-commonjs
In my case switching to that fork also required adding the
handlebars
package as an explicit dependency for my project.The implication is that the code in this bootstrap3-wysiwyg repository is not CommonJS compliant. See issue, #166.
Regarding the actual nature of the error message it looks to me like this package has a more-or-less global variable called wysihtml5 that gets split into two separate scopes when loaded by SystemJS. The 'font-styles' handlebars template is defined using the
tpl
property in the first scope but later looked up in the second scope where thetpl
template property was never defined.I suspect that when the .js file from this project is loaded directly from a
script
directive in html (instead of via SystemJS) the two scopes are one in the same.The text was updated successfully, but these errors were encountered: