wysiwyg-rails 2.6.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -3
- data/app/assets/javascripts/froala_editor.min.js +3 -8
- data/app/assets/javascripts/froala_editor.pkgd.min.js +3 -17
- data/app/assets/javascripts/languages/ar.js +92 -4
- data/app/assets/javascripts/languages/bs.js +92 -4
- data/app/assets/javascripts/languages/cs.js +92 -4
- data/app/assets/javascripts/languages/da.js +196 -111
- data/app/assets/javascripts/languages/de.js +167 -79
- data/app/assets/javascripts/languages/el.js +327 -0
- data/app/assets/javascripts/languages/en_ca.js +94 -6
- data/app/assets/javascripts/languages/en_gb.js +92 -4
- data/app/assets/javascripts/languages/es.js +93 -5
- data/app/assets/javascripts/languages/et.js +92 -4
- data/app/assets/javascripts/languages/fa.js +96 -8
- data/app/assets/javascripts/languages/fi.js +92 -4
- data/app/assets/javascripts/languages/fr.js +129 -41
- data/app/assets/javascripts/languages/he.js +92 -4
- data/app/assets/javascripts/languages/hr.js +92 -4
- data/app/assets/javascripts/languages/hu.js +105 -17
- data/app/assets/javascripts/languages/id.js +92 -4
- data/app/assets/javascripts/languages/it.js +198 -110
- data/app/assets/javascripts/languages/ja.js +191 -103
- data/app/assets/javascripts/languages/ko.js +116 -28
- data/app/assets/javascripts/languages/ku.js +314 -0
- data/app/assets/javascripts/languages/me.js +92 -4
- data/app/assets/javascripts/languages/nb.js +92 -4
- data/app/assets/javascripts/languages/nl.js +101 -13
- data/app/assets/javascripts/languages/pl.js +92 -4
- data/app/assets/javascripts/languages/pt_br.js +165 -77
- data/app/assets/javascripts/languages/pt_pt.js +94 -6
- data/app/assets/javascripts/languages/ro.js +92 -5
- data/app/assets/javascripts/languages/ru.js +95 -7
- data/app/assets/javascripts/languages/sk.js +92 -5
- data/app/assets/javascripts/languages/sr.js +92 -4
- data/app/assets/javascripts/languages/sv.js +121 -33
- data/app/assets/javascripts/languages/th.js +93 -5
- data/app/assets/javascripts/languages/tr.js +92 -4
- data/app/assets/javascripts/languages/{ua.js → uk.js} +93 -5
- data/app/assets/javascripts/languages/vi.js +92 -4
- data/app/assets/javascripts/languages/zh_cn.js +259 -171
- data/app/assets/javascripts/languages/zh_tw.js +92 -4
- data/app/assets/javascripts/plugins/align.min.js +3 -3
- data/app/assets/javascripts/plugins/char_counter.min.js +3 -3
- data/app/assets/javascripts/plugins/code_beautifier.min.js +3 -4
- data/app/assets/javascripts/plugins/code_view.min.js +3 -3
- data/app/assets/javascripts/plugins/colors.min.js +3 -3
- data/app/assets/javascripts/plugins/draggable.min.js +3 -3
- data/app/assets/javascripts/plugins/emoticons.min.js +3 -3
- data/app/assets/javascripts/plugins/entities.min.js +3 -3
- data/app/assets/javascripts/plugins/file.min.js +3 -3
- data/app/assets/javascripts/plugins/font_family.min.js +3 -3
- data/app/assets/javascripts/plugins/font_size.min.js +3 -3
- data/app/assets/javascripts/plugins/forms.min.js +3 -3
- data/app/assets/javascripts/plugins/fullscreen.min.js +3 -3
- data/app/assets/javascripts/plugins/help.min.js +3 -3
- data/app/assets/javascripts/plugins/image.min.js +3 -4
- data/app/assets/javascripts/plugins/image_manager.min.js +3 -3
- data/app/assets/javascripts/plugins/inline_class.min.js +7 -0
- data/app/assets/javascripts/plugins/inline_style.min.js +3 -3
- data/app/assets/javascripts/plugins/line_breaker.min.js +3 -3
- data/app/assets/javascripts/plugins/line_height.min.js +7 -0
- data/app/assets/javascripts/plugins/link.min.js +3 -3
- data/app/assets/javascripts/plugins/lists.min.js +3 -3
- data/app/assets/javascripts/plugins/paragraph_format.min.js +3 -3
- data/app/assets/javascripts/plugins/paragraph_style.min.js +3 -3
- data/app/assets/javascripts/plugins/print.min.js +3 -3
- data/app/assets/javascripts/plugins/quick_insert.min.js +3 -3
- data/app/assets/javascripts/plugins/quote.min.js +3 -3
- data/app/assets/javascripts/plugins/save.min.js +3 -3
- data/app/assets/javascripts/plugins/special_characters.min.js +3 -3
- data/app/assets/javascripts/plugins/table.min.js +3 -4
- data/app/assets/javascripts/plugins/url.min.js +3 -3
- data/app/assets/javascripts/plugins/video.min.js +3 -4
- data/app/assets/javascripts/plugins/word_paste.min.js +3 -3
- data/app/assets/javascripts/third_party/embedly.min.js +7 -0
- data/app/assets/javascripts/third_party/font_awesome.min.js +7 -0
- data/app/assets/javascripts/third_party/image_aviary.min.js +7 -0
- data/app/assets/javascripts/third_party/image_tui.min.js +7 -0
- data/app/assets/javascripts/third_party/spell_checker.min.js +7 -0
- data/app/assets/stylesheets/froala_editor.css +159 -31
- data/app/assets/stylesheets/froala_editor.min.css +3 -3
- data/app/assets/stylesheets/froala_editor.pkgd.css +274 -82
- data/app/assets/stylesheets/froala_editor.pkgd.min.css +3 -3
- data/app/assets/stylesheets/froala_style.css +174 -26
- data/app/assets/stylesheets/froala_style.min.css +3 -3
- data/app/assets/stylesheets/plugins/char_counter.css +2 -2
- data/app/assets/stylesheets/plugins/char_counter.min.css +2 -2
- data/app/assets/stylesheets/plugins/code_view.css +2 -2
- data/app/assets/stylesheets/plugins/code_view.min.css +2 -2
- data/app/assets/stylesheets/plugins/colors.css +34 -3
- data/app/assets/stylesheets/plugins/colors.min.css +3 -3
- data/app/assets/stylesheets/plugins/draggable.css +3 -3
- data/app/assets/stylesheets/plugins/draggable.min.css +3 -3
- data/app/assets/stylesheets/plugins/emoticons.css +2 -2
- data/app/assets/stylesheets/plugins/emoticons.min.css +2 -2
- data/app/assets/stylesheets/plugins/file.css +16 -16
- data/app/assets/stylesheets/plugins/file.min.css +3 -3
- data/app/assets/stylesheets/plugins/fullscreen.css +3 -3
- data/app/assets/stylesheets/plugins/fullscreen.min.css +3 -3
- data/app/assets/stylesheets/plugins/help.css +2 -2
- data/app/assets/stylesheets/plugins/help.min.css +2 -2
- data/app/assets/stylesheets/plugins/image.css +17 -16
- data/app/assets/stylesheets/plugins/image.min.css +3 -3
- data/app/assets/stylesheets/plugins/image_manager.css +4 -2
- data/app/assets/stylesheets/plugins/image_manager.min.css +3 -3
- data/app/assets/stylesheets/plugins/line_breaker.css +2 -2
- data/app/assets/stylesheets/plugins/line_breaker.min.css +2 -2
- data/app/assets/stylesheets/plugins/quick_insert.css +4 -4
- data/app/assets/stylesheets/plugins/quick_insert.min.css +3 -3
- data/app/assets/stylesheets/plugins/special_characters.css +2 -2
- data/app/assets/stylesheets/plugins/special_characters.min.css +2 -2
- data/app/assets/stylesheets/plugins/table.css +34 -4
- data/app/assets/stylesheets/plugins/table.min.css +3 -3
- data/app/assets/stylesheets/plugins/video.css +18 -18
- data/app/assets/stylesheets/plugins/video.min.css +3 -3
- data/app/assets/stylesheets/themes/dark.css +199 -45
- data/app/assets/stylesheets/themes/dark.min.css +3 -3
- data/app/assets/stylesheets/themes/gray.css +197 -43
- data/app/assets/stylesheets/themes/gray.min.css +3 -3
- data/app/assets/stylesheets/themes/red.css +198 -44
- data/app/assets/stylesheets/themes/red.min.css +3 -3
- data/app/assets/stylesheets/themes/royal.css +210 -56
- data/app/assets/stylesheets/themes/royal.min.css +3 -3
- data/app/assets/stylesheets/third_party/embedly.css +64 -0
- data/app/assets/stylesheets/third_party/embedly.min.css +7 -0
- data/app/assets/stylesheets/third_party/font_awesome.css +50 -0
- data/app/assets/stylesheets/third_party/font_awesome.min.css +7 -0
- data/app/assets/stylesheets/third_party/image_tui.css +42 -0
- data/app/assets/stylesheets/third_party/image_tui.min.css +7 -0
- data/app/assets/stylesheets/third_party/spell_checker.css +72 -0
- data/app/assets/stylesheets/{plugins → third_party}/spell_checker.min.css +2 -2
- data/lib/wysiwyg-rails/engine.rb +0 -2
- data/lib/wysiwyg-rails/version.rb +1 -1
- metadata +20 -26
- data/app/assets/javascripts/plugins/image_aviary.min.js +0 -7
- data/app/assets/javascripts/plugins/spell_checker.min.js +0 -7
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(
|
7
|
+
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,o){return o===undefined&&(o="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(o)}:t(window.jQuery)}(function(g){g.extend(g.FE.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_EMOTICONS_]"}),g.extend(g.FE.DEFAULTS,{emoticonsStep:8,emoticonsSet:[{code:"1f600",desc:"Grinning face"},{code:"1f601",desc:"Grinning face with smiling eyes"},{code:"1f602",desc:"Face with tears of joy"},{code:"1f603",desc:"Smiling face with open mouth"},{code:"1f604",desc:"Smiling face with open mouth and smiling eyes"},{code:"1f605",desc:"Smiling face with open mouth and cold sweat"},{code:"1f606",desc:"Smiling face with open mouth and tightly-closed eyes"},{code:"1f607",desc:"Smiling face with halo"},{code:"1f608",desc:"Smiling face with horns"},{code:"1f609",desc:"Winking face"},{code:"1f60a",desc:"Smiling face with smiling eyes"},{code:"1f60b",desc:"Face savoring delicious food"},{code:"1f60c",desc:"Relieved face"},{code:"1f60d",desc:"Smiling face with heart-shaped eyes"},{code:"1f60e",desc:"Smiling face with sunglasses"},{code:"1f60f",desc:"Smirking face"},{code:"1f610",desc:"Neutral face"},{code:"1f611",desc:"Expressionless face"},{code:"1f612",desc:"Unamused face"},{code:"1f613",desc:"Face with cold sweat"},{code:"1f614",desc:"Pensive face"},{code:"1f615",desc:"Confused face"},{code:"1f616",desc:"Confounded face"},{code:"1f617",desc:"Kissing face"},{code:"1f618",desc:"Face throwing a kiss"},{code:"1f619",desc:"Kissing face with smiling eyes"},{code:"1f61a",desc:"Kissing face with closed eyes"},{code:"1f61b",desc:"Face with stuck out tongue"},{code:"1f61c",desc:"Face with stuck out tongue and winking eye"},{code:"1f61d",desc:"Face with stuck out tongue and tightly-closed eyes"},{code:"1f61e",desc:"Disappointed face"},{code:"1f61f",desc:"Worried face"},{code:"1f620",desc:"Angry face"},{code:"1f621",desc:"Pouting face"},{code:"1f622",desc:"Crying face"},{code:"1f623",desc:"Persevering face"},{code:"1f624",desc:"Face with look of triumph"},{code:"1f625",desc:"Disappointed but relieved face"},{code:"1f626",desc:"Frowning face with open mouth"},{code:"1f627",desc:"Anguished face"},{code:"1f628",desc:"Fearful face"},{code:"1f629",desc:"Weary face"},{code:"1f62a",desc:"Sleepy face"},{code:"1f62b",desc:"Tired face"},{code:"1f62c",desc:"Grimacing face"},{code:"1f62d",desc:"Loudly crying face"},{code:"1f62e",desc:"Face with open mouth"},{code:"1f62f",desc:"Hushed face"},{code:"1f630",desc:"Face with open mouth and cold sweat"},{code:"1f631",desc:"Face screaming in fear"},{code:"1f632",desc:"Astonished face"},{code:"1f633",desc:"Flushed face"},{code:"1f634",desc:"Sleeping face"},{code:"1f635",desc:"Dizzy face"},{code:"1f636",desc:"Face without mouth"},{code:"1f637",desc:"Face with medical mask"}],emoticonsButtons:["emoticonsBack","|"],emoticonsUseImage:!0}),g.FE.PLUGINS.emoticons=function(E){function n(){if(!E.selection.isCollapsed())return!1;var e=E.selection.element(),o=E.selection.endElement();if(e&&E.node.hasClass(e,"fr-emoticon"))return e;if(o&&E.node.hasClass(o,"fr-emoticon"))return o;var t=E.selection.ranges(0),s=t.startContainer;if(s.nodeType==Node.ELEMENT_NODE&&0<s.childNodes.length&&0<t.startOffset){var n=s.childNodes[t.startOffset-1];if(E.node.hasClass(n,"fr-emoticon"))return n}return!1}return{_init:function(){var e=function(){for(var e=E.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),o=0;o<e.length;o++)e[o].className+=" fr-deletable"};e(),E.events.on("html.set",e),E.events.on("keydown",function(e){if(E.keys.isCharacter(e.which)&&E.selection.inEditor()){var o=E.selection.ranges(0),t=n();E.node.hasClass(t,"fr-emoticon-img")&&t&&(0===o.startOffset&&E.selection.element()===t?g(t).before(g.FE.MARKERS+g.FE.INVISIBLE_SPACE):g(t).after(g.FE.INVISIBLE_SPACE+g.FE.MARKERS),E.selection.restore())}}),E.events.on("keyup",function(e){for(var o=E.el.querySelectorAll(".fr-emoticon"),t=0;t<o.length;t++)"undefined"!=typeof o[t].textContent&&0===o[t].textContent.replace(/\u200B/gi,"").length&&g(o[t]).remove();if(!(e.which>=g.FE.KEYCODE.ARROW_LEFT&&e.which<=g.FE.KEYCODE.ARROW_DOWN)){var s=n();E.node.hasClass(s,"fr-emoticon-img")&&(g(s).append(g.FE.MARKERS),E.selection.restore())}})},insert:function(e,o){var t=n(),s=E.selection.ranges(0);t?(0===s.startOffset&&E.selection.element()===t?g(t).before(g.FE.MARKERS+g.FE.INVISIBLE_SPACE):0<s.startOffset&&E.selection.element()===t&&s.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&g(t).after(g.FE.INVISIBLE_SPACE+g.FE.MARKERS),E.selection.restore(),E.html.insert('<span class="fr-emoticon fr-deletable'+(o?" fr-emoticon-img":"")+'"'+(o?' style="background: url('+o+');"':"")+">"+(o?" ":e)+"</span> "+g.FE.MARKERS,!0)):E.html.insert('<span class="fr-emoticon fr-deletable'+(o?" fr-emoticon-img":"")+'"'+(o?' style="background: url('+o+');"':"")+">"+(o?" ":e)+"</span> ",!0)},showEmoticonsPopup:function(){var e=E.$tb.find('.fr-command[data-cmd="emoticons"]'),o=E.popups.get("emoticons");if(o||(o=function(){var e="";E.opts.toolbarInline&&0<E.opts.emoticonsButtons.length&&(e='<div class="fr-buttons fr-emoticons-buttons">'+E.button.buildList(E.opts.emoticonsButtons)+"</div>");var h,o={buttons:e,emoticons:function(){for(var e='<div style="text-align: center">',o=0;o<E.opts.emoticonsSet.length;o++)0!==o&&o%E.opts.emoticonsStep==0&&(e+="<br>"),e+='<span class="fr-command fr-emoticon" tabIndex="-1" data-cmd="insertEmoticon" title="'+E.language.translate(E.opts.emoticonsSet[o].desc)+'" role="button" data-param1="'+E.opts.emoticonsSet[o].code+'">'+(E.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'+E.opts.emoticonsSet[o].code+'.svg"/>':"&#x"+E.opts.emoticonsSet[o].code+";")+'<span class="fr-sr-only">'+E.language.translate(E.opts.emoticonsSet[o].desc)+" </span></span>";return E.opts.emoticonsUseImage&&(e+='<p style="font-size: 12px; text-align: center; padding: 0 5px;">Emoji free by <a class="fr-link" tabIndex="-1" href="http://emojione.com/" target="_blank" rel="nofollow noopener noreferrer" role="link" aria-label="Open Emoji One website.">Emoji One</a></p>'),e+="</div>"}()},t=E.popups.create("emoticons",o);return E.tooltip.bind(t,".fr-emoticon"),h=t,E.events.on("popup.tab",function(e){var o=g(e.currentTarget);if(!E.popups.isVisible("emoticons")||!o.is("span, a"))return!0;var t,s,n,c=e.which;if(g.FE.KEYCODE.TAB==c){if(o.is("span.fr-emoticon")&&e.shiftKey||o.is("a")&&!e.shiftKey){var i=h.find(".fr-buttons");t=!E.accessibility.focusToolbar(i,!!e.shiftKey)}if(!1!==t){var a=h.find("span.fr-emoticon:focus:first, span.fr-emoticon:visible:first, a");o.is("span.fr-emoticon")&&(a=a.not("span.fr-emoticon:not(:focus)")),s=a.index(o),s=e.shiftKey?((s-1)%a.length+a.length)%a.length:(s+1)%a.length,n=a.get(s),E.events.disableBlur(),n.focus(),t=!1}}else if(g.FE.KEYCODE.ARROW_UP==c||g.FE.KEYCODE.ARROW_DOWN==c||g.FE.KEYCODE.ARROW_LEFT==c||g.FE.KEYCODE.ARROW_RIGHT==c){if(o.is("span.fr-emoticon")){var f=o.parent().find("span.fr-emoticon");s=f.index(o);var d=E.opts.emoticonsStep,r=Math.floor(f.length/d),l=s%d,m=Math.floor(s/d),u=m*d+l,p=r*d;g.FE.KEYCODE.ARROW_UP==c?u=((u-d)%p+p)%p:g.FE.KEYCODE.ARROW_DOWN==c?u=(u+d)%p:g.FE.KEYCODE.ARROW_LEFT==c?u=((u-1)%p+p)%p:g.FE.KEYCODE.ARROW_RIGHT==c&&(u=(u+1)%p),n=g(f.get(u)),E.events.disableBlur(),n.focus(),t=!1}}else g.FE.KEYCODE.ENTER==c&&(o.is("a")?o[0].click():E.button.exec(o),t=!1);return!1===t&&(e.preventDefault(),e.stopPropagation()),t},!0),t}()),!o.hasClass("fr-active")){E.popups.refresh("emoticons"),E.popups.setContainer("emoticons",E.$tb);var t=e.offset().left+e.outerWidth()/2,s=e.offset().top+(E.opts.toolbarBottom?10:e.outerHeight()-10);E.popups.show("emoticons",t,s,e.outerHeight())}},hideEmoticonsPopup:function(){E.popups.hide("emoticons")},back:function(){E.popups.hide("emoticons"),E.toolbar.showInline()}}},g.FE.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile"}),g.FE.RegisterCommand("emoticons",{title:"Emoticons",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("emoticons")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("emoticons")):this.emoticons.showEmoticonsPopup()},plugin:"emoticons"}),g.FE.RegisterCommand("insertEmoticon",{callback:function(e,o){this.emoticons.insert("&#x"+o+";",this.opts.emoticonsUseImage?"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/"+o+".svg":null),this.emoticons.hideEmoticonsPopup()}}),g.FE.DefineIcon("emoticonsBack",{NAME:"arrow-left"}),g.FE.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(
|
7
|
+
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(e,r){return r===undefined&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(e)),a(r)}:a(window.jQuery)}(function(c){c.extend(c.FE.DEFAULTS,{entities:""'¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿŒœŠšŸƒˆ˜ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ   ‌‍‎‏–—‘’‚“”„†‡•…‰′″‹›‾⁄€ℑ℘ℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋⟨⟩◊♠♣♥♦"}),c.FE.PLUGINS.entities=function(t){var n,u;function i(e){var r=e.textContent;if(r.match(n)){for(var a="",i=0;i<r.length;i++)u[r[i]]?a+=u[r[i]]:a+=r[i];e.textContent=a}}function o(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var r=t.node.contents(e),a=0;a<r.length;a++)r[a].nodeType==Node.TEXT_NODE?i(r[a]):o(r[a]);e.nodeType==Node.TEXT_NODE&&i(e)}function l(e){return 0===e.length?"":t.clean.exec(e,o).replace(/\&/g,"&")}return{_init:function(){t.opts.htmlSimpleAmpersand||(t.opts.entities=t.opts.entities+"&");var e=c("<div>").html(t.opts.entities).text(),r=t.opts.entities.split(";");u={},n="";for(var a=0;a<e.length;a++){var i=e.charAt(a);u[i]=r[a]+";",n+="\\"+i+(a<e.length-1?"|":"")}n=new RegExp("("+n+")","g"),t.events.on("html.get",l,!0)}}}});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(
|
7
|
+
!function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),i(t)}:i(window.jQuery)}(function(E){E.extend(E.FE.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),E.extend(E.FE.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),E.FE.PLUGINS.file=function(f){var r,p="https://i.froala.com/upload",l=2,d=3,u=4,c=5,v=6,i={};function g(){var e=f.popups.get("file.insert");e||(e=S()),e.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),e.find(".fr-file-progress-bar-layer").addClass("fr-active"),e.find(".fr-buttons").hide(),n(f.language.translate("Uploading"),0)}function o(e){var t=f.popups.get("file.insert");t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-file-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e&&(f.events.focus(),f.popups.hide("file.insert")))}function n(e,t){var i=f.popups.get("file.insert");if(i){var r=i.find(".fr-file-progress-bar-layer");r.find("h3").text(e+(t?" "+t+"%":"")),r.removeClass("fr-error"),t?(r.find("div").removeClass("fr-indeterminate"),r.find("div > span").css("width",t+"%")):r.find("div").addClass("fr-indeterminate")}}function h(e,t,i){f.edit.on(),f.events.focus(!0),f.selection.restore(),f.opts.fileUseSelectedText&&f.selection.text().length&&(t=f.selection.text()),f.html.insert('<a href="'+e+'" target="_blank" id="fr-inserted-file" class="fr-file">'+t+"</a>");var r=f.$el.find("#fr-inserted-file");r.removeAttr("id"),f.popups.hide("file.insert"),f.undo.saveStep(),C(),f.events.trigger("file.inserted",[r,i])}function m(e){var t=this.status,i=this.response,r=this.responseXML,o=this.responseText;try{if(f.opts.fileUploadToS3)if(201==t){var n=function(e){try{var t=E(e).find("Location").text(),i=E(e).find("Key").text();return!1===f.events.trigger("file.uploadedToS3",[t,i,e],!0)?(f.edit.on(),!1):t}catch(r){return U(u,e),!1}}(r);n&&h(n,e,i||r)}else U(u,i||r);else if(200<=t&&t<300){var a=function(e){try{if(!1===f.events.trigger("file.uploaded",[e],!0))return f.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(U(l,e),!1)}catch(i){return U(u,e),!1}}(o);a&&h(a.link,e,i||o)}else U(d,i||o)}catch(s){U(u,i||o)}}function b(){U(u,this.response||this.responseText||this.responseXML)}function y(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;n(f.language.translate("Uploading"),t)}}function U(e,t){f.edit.on(),function(e){g();var t=f.popups.get("file.insert").find(".fr-file-progress-bar-layer");t.addClass("fr-error");var i=t.find("h3");i.text(e),f.events.disableBlur(),i.focus()}(f.language.translate("Something went wrong. Please try again.")),f.events.trigger("file.error",[{code:e,message:i[e]},t])}function w(){f.edit.on(),o(!0)}function a(e){if(void 0!==e&&0<e.length){if(!1===f.events.trigger("file.beforeUpload",[e]))return!1;var t,i=e[0];if((null===f.opts.fileUploadURL||f.opts.fileUploadURL==p)&&!f.opts.fileUploadToS3)return s=i,(l=new FileReader).addEventListener("load",function(){for(var e=l.result,t=atob(l.result.split(",")[1]),i=[],r=0;r<t.length;r++)i.push(t.charCodeAt(r));e=window.URL.createObjectURL(new Blob([new Uint8Array(i)],{type:s.type})),f.file.insert(e,s.name,null)},!1),g(),l.readAsDataURL(s),!1;if(i.size>f.opts.fileMaxSize)return U(c),!1;if(f.opts.fileAllowedTypes.indexOf("*")<0&&f.opts.fileAllowedTypes.indexOf(i.type.replace(/file\//g,""))<0)return U(v),!1;if(f.drag_support.formdata&&(t=f.drag_support.formdata?new FormData:null),t){var r;if(!1!==f.opts.fileUploadToS3)for(r in t.append("key",f.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",i.type),f.opts.fileUploadToS3.params)f.opts.fileUploadToS3.params.hasOwnProperty(r)&&t.append(r,f.opts.fileUploadToS3.params[r]);for(r in f.opts.fileUploadParams)f.opts.fileUploadParams.hasOwnProperty(r)&&t.append(r,f.opts.fileUploadParams[r]);t.append(f.opts.fileUploadParam,i);var o=f.opts.fileUploadURL;f.opts.fileUploadToS3&&(o=f.opts.fileUploadToS3.uploadURL?f.opts.fileUploadToS3.uploadURL:"https://"+f.opts.fileUploadToS3.region+".amazonaws.com/"+f.opts.fileUploadToS3.bucket);var n=f.core.getXHR(o,f.opts.fileUploadMethod);n.onload=function(){m.call(n,i.name)},n.onerror=b,n.upload.onprogress=y,n.onabort=w,g();var a=f.popups.get("file.insert");a&&a.off("abortUpload").on("abortUpload",function(){4!=n.readyState&&n.abort()}),n.send(t)}}var s,l}function s(){o()}function S(e){if(e)return f.popups.onHide("file.insert",s),!0;var t;f.opts.fileUpload||f.opts.fileInsertButtons.splice(f.opts.fileInsertButtons.indexOf("fileUpload"),1),t='<div class="fr-buttons">'+f.button.buildList(f.opts.fileInsertButtons)+"</div>";var i="";f.opts.fileUpload&&(i='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'+f.id+'"><strong>'+f.language.translate("Drop file")+"</strong><br>("+f.language.translate("or click")+')<div class="fr-form"><input type="file" name="'+f.opts.fileUploadParam+'" accept="'+(0<=f.opts.fileAllowedTypes.indexOf("*")?"/":"")+f.opts.fileAllowedTypes.join(", ").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-'+f.id+'" role="button"></div></div>');var r,o={buttons:t,upload_layer:i,progress_bar:'<div class="fr-file-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="fileDismissError" tabIndex="2" role="button">OK</button></div></div>'},n=f.popups.create("file.insert",o);return r=n,f.events.$on(r,"dragover dragenter",".fr-file-upload-layer",function(){return E(this).addClass("fr-drop"),!1},!0),f.events.$on(r,"dragleave dragend",".fr-file-upload-layer",function(){return E(this).removeClass("fr-drop"),!1},!0),f.events.$on(r,"drop",".fr-file-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),E(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;t&&t.files&&(r.data("instance")||f).file.upload(t.files)},!0),f.helpers.isIOS()&&f.events.$on(r,"touchstart",'.fr-file-upload-layer input[type="file"]',function(){E(this).trigger("click")}),f.events.$on(r,"change",'.fr-file-upload-layer input[type="file"]',function(){if(this.files){var e=r.data("instance")||f;e.events.disableBlur(),r.find("input:focus").blur(),e.events.enableBlur(),e.file.upload(this.files)}E(this).val("")},!0),n}function e(e){f.node.hasClass(e,"fr-file")}function t(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var i=t.files[0];if(i&&"undefined"!=typeof i.type){if(i.type.indexOf("image")<0){if(!f.opts.fileUpload)return e.preventDefault(),e.stopPropagation(),!1;f.markers.remove(),f.markers.insertAtPoint(e.originalEvent),f.$el.find(".fr-marker").replaceWith(E.FE.MARKERS),f.popups.hideAll();var r=f.popups.get("file.insert");return r||(r=S()),f.popups.setContainer("file.insert",f.$sc),f.popups.show("file.insert",e.originalEvent.pageX,e.originalEvent.pageY),g(),a(t.files),e.preventDefault(),e.stopPropagation(),!1}}else i.type.indexOf("image")<0&&(e.preventDefault(),e.stopPropagation())}}function C(){var e,t=Array.prototype.slice.call(f.el.querySelectorAll("a.fr-file")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("href"));if(r)for(e=0;e<r.length;e++)i.indexOf(r[e].getAttribute("href"))<0&&f.events.trigger("file.unlink",[r[e]]);r=t}return i[1]="File cannot be loaded from the passed link.",i[l]="No link in upload response.",i[d]="Error during file upload.",i[u]="Parsing response failed.",i[c]="File is too large.",i[v]="File file type is invalid.",i[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:function(){f.events.on("drop",t),f.events.$on(f.$win,"keydown",function(e){var t=e.which,i=f.popups.get("file.insert");i&&t==E.FE.KEYCODE.ESC&&i.trigger("abortUpload")}),f.events.on("destroy",function(){var e=f.popups.get("file.insert");e&&e.trigger("abortUpload")}),f.events.on("link.beforeRemove",e),f.$wp&&(C(),f.events.on("contentChanged",C)),S(!0)},showInsertPopup:function(){var e=f.$tb.find('.fr-command[data-cmd="insertFile"]'),t=f.popups.get("file.insert");if(t||(t=S()),o(),!t.hasClass("fr-active"))if(f.popups.refresh("file.insert"),f.popups.setContainer("file.insert",f.$tb),e.is(":visible")){var i=e.offset().left+e.outerWidth()/2,r=e.offset().top+(f.opts.toolbarBottom?10:e.outerHeight()-10);f.popups.show("file.insert",i,r,e.outerHeight())}else f.position.forSelection(t),f.popups.show("file.insert")},upload:a,insert:h,back:function(){f.events.disableBlur(),f.selection.restore(),f.events.enableBlur(),f.popups.hide("file.insert"),f.toolbar.showInline()},hideProgressBar:o}},E.FE.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file"}),E.FE.RegisterCommand("insertFile",{title:"Upload File",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("file.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("file.insert")):this.file.showInsertPopup()},plugin:"file"}),E.FE.DefineIcon("fileBack",{NAME:"arrow-left"}),E.FE.RegisterCommand("fileBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.file.back()},refresh:function(e){this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),E.FE.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(
|
7
|
+
!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t)}:n(window.jQuery)}(function(l){l.extend(l.FE.DEFAULTS,{fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","Times New Roman,Times,serif,-webkit-standard":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},fontFamilySelection:!1,fontFamilyDefaultSelection:"Font Family"}),l.FE.PLUGINS.fontFamily=function(o){function i(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return l.grep(t,function(e){return 0<e.length})}function r(e,t){for(var n=0;n<e.length;n++)for(var a=0;a<t.length;a++)if(e[n].toLowerCase()==t[a].toLowerCase())return[n,a];return null}function f(){var e=i(l(o.selection.element()).css("font-family")),t=[];for(var n in o.opts.fontFamily)if(o.opts.fontFamily.hasOwnProperty(n)){var a=r(e,i(n));a&&t.push([n,a])}return 0===t.length?null:(t.sort(function(e,t){var n=e[1][0]-t[1][0];return 0===n?e[1][1]-t[1][1]:n}),t[0][0])}return{apply:function(e){o.format.applyStyle("font-family",e)},refreshOnShow:function(e,t){t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'+f()+'"]').addClass("fr-active").attr("aria-selected",!0);var n=t.find(".fr-dropdown-list"),a=t.find(".fr-active").parent();a.length?n.parent().scrollTop(a.offset().top-n.offset().top-(n.parent().outerHeight()/2-a.outerHeight()/2)):n.parent().scrollTop(0)},refresh:function(e){if(o.opts.fontFamilySelection){var t=l(o.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(o.opts.fontFamily[f()]||t[0]||o.language.translate(o.opts.fontFamilyDefaultSelection))}}}},l.FE.RegisterCommand("fontFamily",{type:"dropdown",displaySelection:function(e){return e.opts.fontFamilySelection},defaultSelection:function(e){return e.opts.fontFamilyDefaultSelection},displaySelectionWidth:120,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontFamily;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'+n+'" style="font-family: '+n+'" title="'+t[n]+'">'+t[n]+"</a></li>");return e+="</ul>"},title:"Font Family",callback:function(e,t){this.fontFamily.apply(t)},refresh:function(e){this.fontFamily.refresh(e)},refreshOnShow:function(e,t){this.fontFamily.refreshOnShow(e,t)},plugin:"fontFamily"}),l.FE.DefineIcon("fontFamily",{NAME:"font"})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(
|
7
|
+
!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t)}:n(window.jQuery)}(function(f){f.extend(f.FE.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),f.FE.PLUGINS.fontSize=function(r){return{apply:function(e){r.format.applyStyle("font-size",e)},refreshOnShow:function(e,t){var n=f(r.selection.element()).css("font-size");"pt"===r.opts.fontSizeUnit&&(n=Math.round(72*parseFloat(n,10)/96)+"pt"),t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0);var o=t.find(".fr-dropdown-list"),i=t.find(".fr-active").parent();i.length?o.parent().scrollTop(i.offset().top-o.offset().top-(o.parent().outerHeight()/2-i.outerHeight()/2)):o.parent().scrollTop(0)},refresh:function(e){if(r.opts.fontSizeSelection){var t=r.helpers.getPX(f(r.selection.element()).css("font-size"));"pt"===r.opts.fontSizeUnit&&(t=Math.round(72*parseFloat(t,10)/96)+"pt"),e.find("> span").text(t)}}}},f.FE.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(e){return e.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(e){return e.opts.fontSizeDefaultSelection},html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontSize,n=0;n<t.length;n++){var o=t[n];e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'+o+this.opts.fontSizeUnit+'" title="'+o+'">'+o+"</a></li>"}return e+="</ul>"},callback:function(e,t){this.fontSize.apply(t)},refresh:function(e){this.fontSize.refresh(e)},refreshOnShow:function(e,t){this.fontSize.refreshOnShow(e,t)},plugin:"fontSize"}),f.FE.DefineIcon("fontSize",{NAME:"text-height"})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(
|
7
|
+
!function(o){"function"==typeof define&&define.amd?define(["jquery"],o):"object"==typeof module&&module.exports?module.exports=function(t,e){return e===undefined&&(e="undefined"!=typeof window?require("jquery"):require("jquery")(t)),o(e)}:o(window.jQuery)}(function(l){l.extend(l.FE.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),l.extend(l.FE.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),l.FE.PLUGINS.forms=function(s){var r;function t(t){t.preventDefault(),s.selection.clear(),l(this).data("mousedown",!0)}function e(t){l(this).data("mousedown")&&(t.stopPropagation(),l(this).removeData("mousedown"),a(r=this)),t.preventDefault()}function o(){s.$el.find("input, textarea, button").removeData("mousedown")}function n(){l(this).removeData("mousedown")}function i(){return r||null}function a(t){var e=s.popups.get("forms.edit");e||(e=function(){var t="";0<s.opts.formEditButtons.length&&(t='<div class="fr-buttons">'+s.button.buildList(s.opts.formEditButtons)+"</div>");var e={buttons:t},o=s.popups.create("forms.edit",e);return s.$wp&&s.events.$on(s.$wp,"scroll.link-edit",function(){i()&&s.popups.isVisible("forms.edit")&&a(i())}),o}());var o=l(r=t);s.popups.refresh("forms.edit"),s.popups.setContainer("forms.edit",s.$sc);var n=o.offset().left+o.outerWidth()/2,u=o.offset().top+o.outerHeight();s.popups.show("forms.edit",n,u,o.outerHeight())}function p(){var t=s.popups.get("forms.update"),e=i();if(e){var o=l(e);o.is("button")?t.find('input[type="text"][name="text"]').val(o.text()):t.find('input[type="text"][name="text"]').val(o.attr("placeholder"))}t.find('input[type="text"][name="text"]').trigger("change")}function f(){r=null}function d(t){if(t)return s.popups.onRefresh("forms.update",p),s.popups.onHide("forms.update",f),!0;var e="";1<=s.opts.formUpdateButtons.length&&(e='<div class="fr-buttons">'+s.button.buildList(s.opts.formUpdateButtons)+"</div>");var o="",n=0;o='<div class="fr-forms-text-layer fr-layer fr-active">',o+='<div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex="'+ ++n+'"></div>';var u={buttons:e,text_layer:o+='<div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="'+ ++n+'" type="button">'+s.language.translate("Update")+"</button></div></div>"};return s.popups.create("forms.update",u)}return{_init:function(){s.events.$on(s.$el,s._mousedown,"input, textarea, button",t),s.events.$on(s.$el,s._mouseup,"input, textarea, button",e),s.events.$on(s.$el,"touchmove","input, textarea, button",n),s.events.$on(s.$el,s._mouseup,o),s.events.$on(s.$win,s._mouseup,o),d(!0),s.events.$on(s.$el,"submit","form",function(t){return t.preventDefault(),!1})},updateInput:function(){var t=s.popups.get("forms.update"),e=i();if(e){var o=l(e),n=t.find('input[type="text"][name="text"]').val()||"";n.length&&(o.is("button")?o.text(n):o.attr("placeholder",n)),s.popups.hide("forms.update"),a(e)}},getInput:i,applyStyle:function(t,e,o){void 0===e&&(e=s.opts.formStyles),void 0===o&&(o=s.opts.formMultipleStyles);var n=i();if(!n)return!1;if(!o){var u=Object.keys(e);u.splice(u.indexOf(t),1),l(n).removeClass(u.join(" "))}l(n).toggleClass(t)},showUpdatePopup:function(){var t=i();if(t){var e=l(t),o=s.popups.get("forms.update");o||(o=d()),s.popups.isVisible("forms.update")||s.popups.refresh("forms.update"),s.popups.setContainer("forms.update",s.$sc);var n=e.offset().left+e.outerWidth()/2,u=e.offset().top+e.outerHeight();s.popups.show("forms.update",n,u,e.outerHeight())}},showEditPopup:a,back:function(){s.events.disableBlur(),s.selection.restore(),s.events.enableBlur();var t=i();t&&s.$wp&&("BUTTON"==t.tagName&&s.selection.restore(),a(t))}}},l.FE.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),l.FE.DefineIcon("inputStyle",{NAME:"magic"}),l.FE.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var t='<ul class="fr-dropdown-list">',e=this.opts.formStyles;for(var o in e)e.hasOwnProperty(o)&&(t+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'+o+'">'+this.language.translate(e[o])+"</a></li>");return t+="</ul>"},callback:function(t,e){var o=this.forms.getInput();o&&(this.forms.applyStyle(e),this.forms.showEditPopup(o))},refreshOnShow:function(t,e){var o=this.forms.getInput();if(o){var n=l(o);e.find(".fr-command").each(function(){var t=l(this).data("param1");l(this).toggleClass("fr-active",n.hasClass(t))})}}}),l.FE.DefineIcon("inputEdit",{NAME:"edit"}),l.FE.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),l.FE.DefineIcon("inputBack",{NAME:"arrow-left"}),l.FE.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),l.FE.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(
|
7
|
+
!function(o){"function"==typeof define&&define.amd?define(["jquery"],o):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),o(t)}:o(window.jQuery)}(function(c){c.FE.PLUGINS.fullscreen=function(o){var t,r,s,n;function i(){return o.$box.hasClass("fr-fullscreen")}function e(){if(o.helpers.isIOS()&&o.core.hasFocus())return o.$el.blur(),setTimeout(a,250),!1;t=o.helpers.scrollTop(),o.$box.toggleClass("fr-fullscreen"),c("body:first").toggleClass("fr-fullscreen"),o.helpers.isMobile()&&(o.$tb.data("parent",o.$tb.parent()),o.$tb.prependTo(o.$box),o.$tb.data("sticky-dummy")&&o.$tb.after(o.$tb.data("sticky-dummy"))),r=o.opts.height,s=o.opts.heightMax,n=o.opts.zIndex,o.position.refresh(),o.opts.height=o.o_win.innerHeight-(o.opts.toolbarInline?0:o.$tb.outerHeight()),o.opts.zIndex=2147483641,o.opts.heightMax=null,o.size.refresh(),o.opts.toolbarInline&&o.toolbar.showInline();for(var e=o.$box.parent();!e.is("body:first");)e.data("z-index",e.css("z-index")).data("overflow",e.css("overflow")).css("z-index","2147483640").css("overflow","visible"),e=e.parent();o.opts.toolbarContainer&&o.$box.prepend(o.$tb),o.events.trigger("charCounter.update"),o.events.trigger("codeView.update"),o.$win.trigger("scroll")}function l(){if(o.helpers.isIOS()&&o.core.hasFocus())return o.$el.blur(),setTimeout(a,250),!1;o.$box.toggleClass("fr-fullscreen"),c("body:first").toggleClass("fr-fullscreen"),o.$tb.prependTo(o.$tb.data("parent")),o.$tb.data("sticky-dummy")&&o.$tb.after(o.$tb.data("sticky-dummy")),o.opts.height=r,o.opts.heightMax=s,o.opts.zIndex=n,o.size.refresh(),c(o.o_win).scrollTop(t),o.opts.toolbarInline&&o.toolbar.showInline(),o.events.trigger("charCounter.update"),o.opts.toolbarSticky&&o.opts.toolbarStickyOffset&&(o.opts.toolbarBottom?o.$tb.css("bottom",o.opts.toolbarStickyOffset).data("bottom",o.opts.toolbarStickyOffset):o.$tb.css("top",o.opts.toolbarStickyOffset).data("top",o.opts.toolbarStickyOffset));for(var e=o.$box.parent();!e.is("body:first");)e.data("z-index")&&(e.css("z-index",""),e.css("z-index")!=e.data("z-index")&&e.css("z-index",e.data("z-index")),e.removeData("z-index")),e.data("overflow")?(e.css("overflow",""),e.css("overflow")!=e.data("overflow")&&e.css("overflow",e.data("overflow"))):e.css("overflow",""),e.removeData("overflow"),e=e.parent();o.opts.toolbarContainer&&c(o.opts.toolbarContainer).append(o.$tb),c(o.o_win).trigger("scroll"),o.events.trigger("codeView.update")}function a(){i()?l():e(),f(o.$tb.find('.fr-command[data-cmd="fullscreen"]'))}function f(e){var t=i();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *:not(.fr-sr-only)").replaceWith(t?o.icon.create("fullscreenCompress"):o.icon.create("fullscreen"))}return{_init:function(){if(!o.$wp)return!1;o.events.$on(c(o.o_win),"resize",function(){i()&&(l(),e())}),o.events.on("toolbar.hide",function(){if(i()&&o.helpers.isMobile())return!1}),o.events.on("position.refresh",function(){if(o.helpers.isIOS())return!i()}),o.events.on("destroy",function(){i()&&l()},!0)},toggle:a,refresh:f,isActive:i}},c.FE.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),c.FE.DefineIcon("fullscreen",{NAME:"expand"}),c.FE.DefineIcon("fullscreenCompress",{NAME:"compress"})});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
|
-
* froala_editor v2.
|
2
|
+
* froala_editor v2.9.0 (https://www.froala.com/wysiwyg-editor)
|
3
3
|
* License https://froala.com/wysiwyg-editor/terms/
|
4
|
-
* Copyright 2014-
|
4
|
+
* Copyright 2014-2018 Froala Labs
|
5
5
|
*/
|
6
6
|
|
7
|
-
!function(
|
7
|
+
!function(l){"function"==typeof define&&define.amd?define(["jquery"],l):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),l(t)}:l(window.jQuery)}(function(n){n.extend(n.FE.DEFAULTS,{helpSets:[{title:"Inline Editor",commands:[{val:"OSkeyE",desc:"Show the editor"}]},{title:"Common actions",commands:[{val:"OSkeyC",desc:"Copy"},{val:"OSkeyX",desc:"Cut"},{val:"OSkeyV",desc:"Paste"},{val:"OSkeyZ",desc:"Undo"},{val:"OSkeyShift+Z",desc:"Redo"},{val:"OSkeyK",desc:"Insert Link"},{val:"OSkeyP",desc:"Insert Image"}]},{title:"Basic Formatting",commands:[{val:"OSkeyA",desc:"Select All"},{val:"OSkeyB",desc:"Bold"},{val:"OSkeyI",desc:"Italic"},{val:"OSkeyU",desc:"Underline"},{val:"OSkeyS",desc:"Strikethrough"},{val:"OSkey]",desc:"Increase Indent"},{val:"OSkey[",desc:"Decrease Indent"}]},{title:"Quote",commands:[{val:"OSkey'",desc:"Increase quote level"},{val:"OSkeyShift+'",desc:"Decrease quote level"}]},{title:"Image / Video",commands:[{val:"OSkey+",desc:"Resize larger"},{val:"OSkey-",desc:"Resize smaller"}]},{title:"Table",commands:[{val:"Alt+Space",desc:"Select table cell"},{val:"Shift+Left/Right arrow",desc:"Extend selection one cell"},{val:"Shift+Up/Down arrow",desc:"Extend selection one row"}]},{title:"Navigation",commands:[{val:"OSkey/",desc:"Shortcuts"},{val:"Alt+F10",desc:"Focus popup / toolbar"},{val:"Esc",desc:"Return focus to previous position"}]}]}),n.FE.PLUGINS.help=function(s){var o,a="help";return{_init:function(){},show:function(){if(!o){var e="<h4>"+s.language.translate("Shortcuts")+"</h4>",t=function(){for(var e='<div class="fr-help-modal">',t=0;t<s.opts.helpSets.length;t++){var l=s.opts.helpSets[t],o="<table>";o+="<thead><tr><th>"+s.language.translate(l.title)+"</th></tr></thead>",o+="<tbody>";for(var a=0;a<l.commands.length;a++){var n=l.commands[a];o+="<tr>",o+="<td>"+s.language.translate(n.desc)+"</td>",o+="<td>"+n.val.replace("OSkey",s.helpers.isMac()?"⌘":"Ctrl+")+"</td>",o+="</tr>"}e+=o+="</tbody></table>"}return e+="</div>"}(),l=s.modals.create(a,e,t);o=l.$modal,l.$head,l.$body,s.events.$on(n(s.o_win),"resize",function(){s.modals.resize(a)})}s.modals.show(a),s.modals.resize(a)},hide:function(){s.modals.hide(a)}}},n.FroalaEditor.DefineIcon("help",{NAME:"question"}),n.FE.RegisterShortcut(n.FE.KEYCODE.SLASH,"help",null,"/"),n.FE.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1})});
|