PluginProbe ʕ •ᴥ•ʔ
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 2.12.4
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v2.12.4
2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 0.0.8 0.0.9 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.1.0 1.1.1 1.1.2 1.10.0 1.10.1 1.11.0 1.12.0 1.12.1 1.12.2 1.12.3 1.13.0 1.13.1 1.13.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0 1.9.0 1.9.1 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.2 2.6.0
sureforms / assets / js / minified / blocks / textarea.min.js
sureforms / assets / js / minified / blocks Last commit date
dropdown.min.js 1 month ago input.min.js 8 months ago multi-choice.min.js 4 months ago number.min.js 10 months ago phone.min.js 2 months ago switch.min.js 1 year ago textarea.min.js 4 months ago url.min.js 1 year ago
textarea.min.js
1 lines
1 function initializeTextarea(){var e=Array.from(document.getElementsByClassName("srfm-textarea-block"));if(e)for(let r of e){let i=r.querySelector("textarea");if(i)if(i.addEventListener("input",function(){var e,t=i.value,l=i.getAttribute("maxLength");""!==l&&(e=r.querySelector(".srfm-text-counter"))&&(t=l-t.length,e.innerText=t+"/"+l)}),"true"===i.getAttribute("data-is-richtext")){addQuillEditor(i),localizeQuillToolbar(i),handleQuillEditorA11Y(i);let e=i?.parentElement?.querySelector(".quill-editor-container");var t=e?.querySelector(".ql-editor");t?.addEventListener("focus",function(){e.parentElement.classList.add("srfm-quill-editor-focused")}),t?.addEventListener("click",function(){e.parentElement.classList.add("srfm-quill-editor-focused")}),t?.addEventListener("blur",function(){e.parentElement.classList.remove("srfm-quill-editor-focused")})}}}function addQuillEditor(l){var e=l.getAttribute("id"),t=Quill.import("attributors/style/align"),i=Quill.import("attributors/style/direction"),r=Quill.import("ui/icons"),r=(r.undo='<svg viewBox="0 0 18 18"><polygon class="ql-fill ql-stroke" points="6 10 4 12 2 10 6 10" /><path class="ql-stroke" d="M8.09,13.91A4.6,4.6,0,0,0,9,14,5,5,0,1,0,4,9" /></svg>',r.redo='<svg viewBox="0 0 18 18"><polygon class="ql-fill ql-stroke" points="12 10 14 12 16 10 12 10" /><path class="ql-stroke" d="M9.91,13.91A4.6,4.6,0,0,1,9,14a5,5,0,1,1,5-5"/></svg>',Quill.register(t,!0),Quill.register(i,!0),"quill-"+e),t=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"];let n=new Quill("#"+r,{theme:"snow",modules:{toolbar:{container:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],["blockquote"],[{align:[]}],[{color:t},{background:t}],["link"],["clean"],["undo","redo"]],handlers:{undo(){this.quill.history.undo()},redo(){this.quill.history.redo()}}},keyboard:{bindings:{tab:!0}},history:{delay:1e3,maxStack:100,userOnly:!0}}});window?.addGlobalSrfmObject(e,n);i=l.value;n.clipboard.dangerouslyPasteHTML(i),n.blur(),n.on("text-change",function(){var e=n.root.innerHTML,t=n.getLength();l.value=1<t?e:"",l.dispatchEvent(new Event("input"))})}function handleQuillEditorA11Y(e){var t,l,e=e.closest(".srfm-textarea-block");e&&(t=e.querySelector(".quill-editor-container"),l=e.querySelector(".ql-container"),e=e.querySelector("label")?.getAttribute("id"),l?.setAttribute("aria-labelledby",e),t?.setAttribute("aria-labelledby",e))}function localizeQuillToolbar(e){if("undefined"!=typeof srfm_quill_i18n){e=e.closest(".srfm-textarea-block");if(e){var t,e=e.querySelector(".ql-header.ql-picker");if(e){let l={1:srfm_quill_i18n.heading_1,2:srfm_quill_i18n.heading_2,3:srfm_quill_i18n.heading_3,4:srfm_quill_i18n.heading_4,5:srfm_quill_i18n.heading_5,6:srfm_quill_i18n.heading_6};e.querySelectorAll(".ql-picker-item").forEach(function(e){var t=e.getAttribute("data-value");t&&l[t]?e.setAttribute("data-label",l[t]):e.setAttribute("data-label",srfm_quill_i18n.normal)});e=e.querySelector(".ql-picker-label");e&&e.setAttribute("data-label",srfm_quill_i18n.normal)}document.getElementById("srfm-quill-i18n-css")||(e=e=>e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),(t=document.createElement("style")).id="srfm-quill-i18n-css",t.textContent='.ql-snow .ql-tooltip::before { content: "'+e(srfm_quill_i18n.visit_url)+'" !important; }.ql-snow .ql-tooltip a.ql-action::after { content: "'+e(srfm_quill_i18n.edit)+'" !important; }.ql-snow .ql-tooltip a.ql-remove::before { content: "'+e(srfm_quill_i18n.remove)+'" !important; }.ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: "'+e(srfm_quill_i18n.save)+'" !important; }.ql-snow .ql-tooltip[data-mode=link]::before { content: "'+e(srfm_quill_i18n.enter_link)+'" !important; }',document.head.appendChild(t))}}}document.addEventListener("DOMContentLoaded",initializeTextarea);