app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.js in activeadmin_trumbowyg-0.1.8 vs app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.js in activeadmin_trumbowyg-0.2.0
- old
+ new
@@ -22,11 +22,11 @@
' <select class="' + trumbowyg.o.prefix + 'highlight-form-control language">',
(function () {
var options = '';
for (var lang in Prism.languages) {
- if (Prism.languages[lang].comment) {
+ if (Prism.languages.hasOwnProperty(lang)) {
options += '<option value="' + lang + '">' + lang + '</option>';
}
}
return options;
@@ -57,14 +57,22 @@
}
$.extend(true, $.trumbowyg, {
// Add some translations
langs: {
+ // jshint camelcase:false
en: {
highlight: 'Code syntax highlight'
- }
+ },
+ pt_br: {
+ highlight: 'Realçar sintaxe de código'
+ },
+ ko: {
+ highlight: '코드 문법 하이라이트'
+ },
+ // jshint camelcase:true
},
- // Add our plugin to Trumbowyg registred plugins
+ // Add our plugin to Trumbowyg registered plugins
plugins: {
highlight: {
init: function (trumbowyg) {
// Fill current Trumbowyg instance with my plugin default options
trumbowyg.o.plugins.highlight = $.extend(true, {},