File modules/editor/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js

Last commit: Tue Aug 28 00:33:27 2018 +0200	Jan Dankert	Editoren für Markdown (SimpleMDE) und HTML (Trumbowyg) installiert.
1 !function(n,i){"use strict";function e(n,e){return['<pre class="language-'+e+'">','<code class="language-'+e+'">'+i.highlight(n,i.languages[e])+"</code>","</pre>"].join("")}function o(n){return{fn:function(){var o=n.openModal("Code",['<div class="'+n.o.prefix+'highlight-form-group">',' <select class="'+n.o.prefix+'highlight-form-control language">',function(){var n="";for(var e in i.languages)i.languages[e].comment&&(n+='<option value="'+e+'">'+e+"</option>");return n}()," </select>","</div>",'<div class="'+n.o.prefix+'highlight-form-group">',' <textarea class="'+n.o.prefix+'highlight-form-control code"></textarea>',"</div>"].join("\n")),t=o.find(".language"),g=o.find(".code");o.on("tbwconfirm",function(){n.restoreRange(),n.execCmd("insertHTML",e(g.val(),t.val())),n.execCmd("insertHTML","<p><br></p>"),n.closeModal()}),o.on("tbwcancel",function(){n.closeModal()})}}}var t={};n.extend(!0,n.trumbowyg,{langs:{en:{highlight:"Code syntax highlight"}},plugins:{highlight:{init:function(i){i.o.plugins.highlight=n.extend(!0,{},t,i.o.plugins.highlight||{}),i.addBtnDef("highlight",o(i))}}}})}(jQuery,Prism);
Download modules/editor/trumbowyg/plugins/highlight/trumbowyg.highlight.min.js
History Tue, 28 Aug 2018 00:33:27 +0200 Jan Dankert Editoren für Markdown (SimpleMDE) und HTML (Trumbowyg) installiert.