jhollingworth/bootstrap-wysihtml5

Cannot read property 'font_styles' of undefined

Opened this issue · 2 comments

I have this error:

Uncaught TypeError:
Cannot read property 'font_styles' of undefined bootstrap-wysihtml5.js:9
tpl.font-styles bootstrap-wysihtml5.js:9
templates bootstrap-wysihtml5.js:120
Wysihtml5.createToolbar bootstrap-wysihtml5.js:185
Wysihtml5 bootstrap-wysihtml5.js:130
(anonymous function) bootstrap-wysihtml5.js:356
jQuery.extend.each jquery-2.0.3.js:590
jQuery.fn.jQuery.each jquery-2.0.3.js:237
methods.bypassDefaults bootstrap-wysihtml5.js:354
methods.shallowExtend bootstrap-wysihtml5.js:362
methods.init bootstrap-wysihtml5.js:371
$.fn.wysihtml5 bootstrap-wysihtml5.js:379
(anonymous function)

you need to import the locale file, for example :

<script src="<path tobootstrap-wysihtml5>/locales/bootstrap-wysihtml5.fr-FR.js"></script>

I know the post is from 2013, but it must be help-full for anyone

#388 AS @pkshetlie suggested import the locale file and make sure to use the correct locale key in your initializing code

The key should be the same as the one defined inside the locale file:

<script src="<path tobootstrap-wysihtml5>/locales/bootstrap-wysihtml5.ar-AR.js"></script>

$('#wysihtml5').wysihtml5({ locale: "ar-AR"});