PageSourceSearch

https://www.taize.fr/assets/admin/lib/editorjs-plugins/foldable/foldable-start-VsAkHFx.js

js taize.fr collected 2026-09-24 09:05:48 UTC 2,662 bytes, 1 lines download raw bytes

1export default class XutimFoldableStartTool{constructor({data:e,api:t,readOnly:n}){this.api=t,this.data={title:e.title||"",open:e.open!==0[0]&&e.open},this.readOnly=!!n}static get isReadOnlySupported(){return!0}static get toolbox(){return{title:"Foldable Start",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-fold-down"><path d="M12 11v8l3 -3m-6 0l3 3" /><path d="M9 7l1 0" /><path d="M14 7l1 0" /><path d="M19 7l1 0" /><path d="M4 7l1 0" /></svg>'}}render(){const e=document.createElement("div");if(e.classList.add("foldable-start-block"),this.readOnly){e.classList.add("p-2","text-center");const t=document.createElement("div");t.classList.add("d-flex","align-items-center","justify-content-center","gap-2");const n=document.createElement("span");n.innerHTML="▼",n.classList.add("text-muted"),n.style.fontSize="0.75rem";const s=document.createElement("span");return s.textContent=this.data.title||"Untitled foldable section",s.classList.add("text-muted","small"),t.appendChild(n),t.appendChild(s),e.appendChild(t),e}e.classList.add("p-3");const n=document.createElement("input");n.type="text",n.value=this.data.title,n.placeholder="Foldable section title...",n.classList.add("form-control","form-control-sm","mb-2"),n.addEventListener("input",e=>{this.data.title=e.target.value});const s=document.createElement("div");s.classList.add("form-check");const t=document.createElement("input");t.type="checkbox",t.checked=this.data.open,t.id=`foldable-open-${Date.now()}`,t.classList.add("form-check-input"),t.addEventListener("change",e=>{this.data.open=e.target.checked});const o=document.createElement("label");o.textContent="Open by default",o.htmlFor=t.id,o.classList.add("form-check-label","small","text-muted"),s.appendChild(t),s.appendChild(o),e.appendChild(n),e.appendChild(s);const i=document.createElement("div");i.classList.add("d-flex","align-items-center","justify-content-center","gap-2","mt-3","pt-2","border-top");const a=document.createElement("span");a.innerHTML="▼",a.classList.add("text-muted"),a.style.fontSize="0.75rem";const r=document.createElement("span");return r.textContent="Start foldable",r.classList.add("text-muted","small"),i.appendChild(a),i.appendChild(r),e.appendChild(i),e}save(e){if(this.readOnly)return this.data;const t=e.querySelector('input[type="text"]'),n=e.querySelector('input[type="checkbox"]');return{title:t?t.value:this.data.title,open:n?n.checked:this.data.open}}validate(e){return!!e.title&&e.title.trim()!==""}}

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.