PageSourceSearch

https://www.acemw.com/Portals/_default/skins/triton//libraries/html-editor.min.js?cdv=311

js acemw.com collected 2026-10-06 02:46:21 UTC 2,149 bytes, 2 lines download raw bytes

1(function(){"use strict";document.addEventListener("DOMContentLoaded",()=>{var m;const l={indent_size:2,wrap_line_length:150,preserve_newlines:!0},s=document.querySelector('textarea[id*="EditHTML_txtContent_TxtDesktopHTML"]'),c=document.querySelector('input[type="radio"][id*="optRenderMode_HTML"]');if(!s)return;c&&!c.checked&&(c.checked=!0,c.click());const a=document.querySelector('[id*="RenderMode"]');a&&(a.style.display="none");let t=CodeMirror.fromTextArea(s,{mode:"htmlmixed",theme:"material-darker",lineNumbers:!0,lineWrapping:!0,matchBrackets:!0,autoCloseTags:!0});u("editor",t),t.setValue(html_beautify(t.getValue(),l)),(m=document.getElementById("beautify-btn"))==null||m.addEventListener("click",()=>f()),g(),h(),S();function f(){const e=html_beautify(t.getValue(),l);t.setValue(e)}function g(){document.querySelectorAll(".page-snippet").forEach(n=>{n.addEventListener("click",()=>b(n))})}function b(e){const n=e.getAttribute("data-html");if(n&&t.getDoc){t.focus();const o=t.getDoc(),i=o.getSelection(),r=o.getCursor();if(i&&i.length>0){const d=y(n,i);o.replaceSelection(d),u("✅ Replaced selection inside snippet in CodeMirror!")}else o.replaceRange(n,r),u("✅ Inserted snippet at cursor in CodeMirror!")}else console.error("❌ CodeMirror editor not available or no snippet.")}function h(){const e=document.getElementById("html-snippets");e&&e.addEventListener("click",function(n){const o=n.target.closest("li[data-html]");if(o){const i=o.getAttribute("data-html");if(i){const r=t.getDoc(),d=r.getCursor();r.replaceRange(i,d),u(`✅ Inserted snippet: ${o.textContent}`)}}})}function y(e,n){const r=new DOMParser().parseFromString(e,"text/html").body.firstChild;return r?(r.textContent=n,r.outerHTML):e}function p(e){return e.replace(/\s{2,}/g," ").replace(/\n/g,"").replace(/>\s+</g,"><").trim()}function S(){if(typeof WebForm_OnSubmit=="function"){const e=WebForm_OnSubmit;window.WebForm_OnSubmit=function(){return s.value=p(t.getValue()),e()}}else{const e=s.closest("form");e&&e.addEventListener("submit",function(){s.value=p(t.getValue())})}}function u(...e){console.log(...e)}})})();
2//# sourceMappingURL=html-editor.min.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.