Sha256: 867b36ef29ee3f60d5ba215634ab4d47a3d3941cc0bb51423cad83df2f491558

Contents?: true

Size: 1.7 KB

Versions: 4

Compression:

Stored size: 1.7 KB

Contents

!function(e){"use strict";e.extend(!0,e.trumbowyg,{langs:{en:{mathml:"Insert Formulas",formulas:"Formulas",inline:"Inline"},da:{mathml:"Indsæt formler",formulas:"Formler",inline:"Inline"},et:{mathml:"Sisesta valem",formulas:"Valemid",inline:"Teksti sees"},fr:{mathml:"Inserer une formule",formulas:"Formule",inline:"En ligne"},hu:{mathml:"Formulák beszúrás",formulas:"Formulák",inline:"Inline"},ko:{mathml:"수식 넣기",formulas:"수식",inline:"글 안에 넣기"},pt_br:{mathml:"Inserir fórmulas",formulas:"Fórmulas",inline:"Em linha"},tr:{mathml:"Formül Ekle",formulas:"Formüller",inline:"Satır içi"},zh_tw:{mathml:"插入方程式",formulas:"方程式",inline:"內嵌"}},plugins:{mathml:{init:function(l){var n={fn:function(){l.saveRange();var n={formulas:{label:l.lang.formulas,required:!0,value:""},inline:{label:l.lang.inline,attributes:{checked:!0},type:"checkbox",required:!1}},a=function(t){var r=t.inline?"$":"$$";if(l.currentMathNode)e(l.currentMathNode).html(r+" "+t.formulas+" "+r).attr("formulas",t.formulas).attr("inline",t.inline?"true":"false");else{var i='<span class="mathMlContainer" contenteditable="false" formulas="'+t.formulas+'" inline="'+(t.inline?"true":"false")+'" >'+r+" "+t.formulas+" "+r+"</span>",m=e(i)[0];m.onclick=function(){l.currentMathNode=this,n.formulas.value=e(this).attr("formulas"),"true"===e(this).attr("inline")?n.inline.attributes.checked=!0:delete n.inline.attributes.checked,l.openModalInsert(l.lang.mathml,n,a)},l.range.deleteContents(),l.range.insertNode(m)}return l.currentMathNode=!1,MathJax.Hub.Queue(["Typeset",MathJax.Hub]),!0};n.formulas.value=l.getRangeText(),n.inline.attributes.checked=!0,l.openModalInsert(l.lang.mathml,n,a)}};l.addBtnDef("mathml",n)}}}})}(jQuery);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activeadmin_trumbowyg-1.1.0 app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js
activeadmin_trumbowyg-1.0.0 app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js
activeadmin_trumbowyg-0.2.16 app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js
activeadmin_trumbowyg-0.2.14 app/assets/javascripts/activeadmin/trumbowyg/plugins/mathml/trumbowyg.mathml.min.js