app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js in activeadmin_trumbowyg-0.2.10 vs app/assets/javascripts/activeadmin/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js in activeadmin_trumbowyg-0.2.12
- old
+ new
@@ -1 +1 @@
-!function(i,n){"use strict";function e(i,e){return['<pre class="language-'+e+'">','<code class="language-'+e+'">'+n.highlight(i,n.languages[e])+"</code>","</pre>"].join("")}function o(i){return{fn:function(){var o=i.openModal("Code",['<div class="'+i.o.prefix+'highlight-form-group">',' <select class="'+i.o.prefix+'highlight-form-control language">',function(){var i="";for(var e in n.languages)n.languages.hasOwnProperty(e)&&(i+='<option value="'+e+'">'+e+"</option>");return i}()," </select>","</div>",'<div class="'+i.o.prefix+'highlight-form-group">',' <textarea class="'+i.o.prefix+'highlight-form-control code"></textarea>',"</div>"].join("\n")),t=o.find(".language"),g=o.find(".code");o.on("tbwconfirm",function(){i.restoreRange(),i.execCmd("insertHTML",e(g.val(),t.val())),i.execCmd("insertHTML","<p><br></p>"),i.closeModal()}),o.on("tbwcancel",function(){i.closeModal()})}}}var t={};i.extend(!0,i.trumbowyg,{langs:{en:{highlight:"Code syntax highlight"},pt_br:{highlight:"Realçar sintaxe de código"},ko:{highlight:"코드 문법 하이라이트"}},plugins:{highlight:{init:function(n){n.o.plugins.highlight=i.extend(!0,{},t,n.o.plugins.highlight||{}),n.addBtnDef("highlight",o(n))}}}})}(jQuery,Prism);
+!function(i,e){"use strict";function g(i,g,l){return['<pre class="language-'+g+'" '+(l?'data-line="'+l+'"':"")+">",'<code class="language-'+g+'">'+e.highlight(i,e.languages[g])+"</code>","</pre>"].join("")}function l(i){return{fn:function(){var l=i.openModal("Code",['<div class="'+i.o.prefix+'highlight-form-group">',' <select class="'+i.o.prefix+'highlight-form-control language">',function(){var i="";for(var g in e.languages)e.languages.hasOwnProperty(g)&&(i+='<option value="'+g+'">'+g+"</option>");return i}()," </select>","</div>",'<div class="'+i.o.prefix+'highlight-form-group">',' <textarea class="'+i.o.prefix+'highlight-form-control code"></textarea>',"</div>",'<div class="'+i.o.prefix+'highlight-form-group">',' <input title="'+i.lang.prismHighlightPluginAlert+'" placeholder="'+i.lang.highlightLine+'" class="'+i.o.prefix+'highlight-form-control trumbowyg-line-highlight"/>',"</div>"].join("\n")),h=l.find(".language"),t=l.find(".code"),n=l.find(".trumbowyg-line-highlight");l.on("tbwconfirm",function(){i.restoreRange(),i.execCmd("insertHTML",g(t.val(),h.val(),n.val())),i.execCmd("insertHTML","<p><br></p>"),i.closeModal()}),l.on("tbwcancel",function(){i.closeModal()})}}}var h={};i.extend(!0,i.trumbowyg,{langs:{en:{highlight:"Code syntax highlight",highlightLine:"Highlight lines, e.g.: 1,3-5",prismHighlightPluginAlert:"You must have Prism Line Highlight plugin installed"},es:{highlight:"Resaltado de sintaxis de código",highlightLine:"Resaltar lineas, ej: 1,3-5",prismHighlightPluginAlert:"Debes de tener el plugin Prism Line Highlight instalado"},hu:{highlight:"Kód kiemelés"},ko:{highlight:"코드 문법 하이라이트"},pt_br:{highlight:"Realçar sintaxe de código"}},plugins:{highlight:{init:function(e){e.o.plugins.highlight=i.extend(!0,{},h,e.o.plugins.highlight||{}),e.addBtnDef("highlight",l(e))}}}})}(jQuery,Prism);
\ No newline at end of file