فاصل

محتوى الأكورديون
قسم Lines-1
قسم الثاني-
Accordion Control Panel

لوحة التحكم - مولد الأكورديون

قم بسحب ملف Word هنا أو انقر للتحميل

يجب أن يكون الملف بصيغة .docx

تخصيص الألوان

الخطوط

اللغة

تجديد-1

Accordion تفاعلي مع قراءة صوتية
🔊
`; const toggleBtn = accordionItem.querySelector('.toggle-btn'); const content = accordionItem.querySelector('.accordion-content'); const header = accordionItem.querySelector('.accordion-header'); header.addEventListener('click', (e) => { if (!e.target.matches('button') && !e.target.matches('[contenteditable="true"]')) { content.style.display = content.style.display === 'none' ? 'block' : 'none'; toggleBtn.textContent = content.style.display === 'none' ? '▼' : '▲'; } }); return accordionItem; } function addMainSection() { const mainAccordion = document.getElementById('main-accordion'); const newSection = createAccordionItem(); mainAccordion.appendChild(newSection); } function addSubSection(parentId) { const parent = document.getElementById(parentId); const subSections = parent.querySelector('.sub-sections'); const newSection = createAccordionItem('sub'); subSections.appendChild(newSection); } function deleteSection(sectionId) { const section = document.getElementById(sectionId); if (section && confirm('هل أنت متأكد من حذف هذا القسم؟')) { section.remove(); } } function checkContent(element) { if (!element.textContent.trim()) { element.classList.add('empty-content'); } else { element.classList.remove('empty-content'); } } function readContent(icon) { const content = icon.previousElementSibling.textContent.trim(); if (content) { const utterance = new SpeechSynthesisUtterance(content); utterance.lang = 'ar'; utterance.rate = 1; utterance.pitch = 1; utterance.volume = 1; speechSynthesis.speak(utterance); } else { alert('لا يوجد محتوى لقراءته.'); } } window.onload = () => { addMainSection(); };
Accordion Control Panel

لوحة التحكم - مولد الأكورديون

قم بسحب ملف Word هنا أو انقر للتحميل

يجب أن يكون الملف بصيغة .docx

تخصيص الألوان

الخطوط

اللغة

تجديد-2

مولد الأكورديون متعدد المستويات
`; const blob = new Blob([iframeContent], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'accordion-embed.html'; a.click(); URL.revokeObjectURL(url); } } // تهيئة مولد الأكورديون const accordion = new AccordionGenerator(); // معالجة إدخال الملف document.getElementById('fileInput').addEventListener('change', (e) => { const file = e.target.files[0]; if (file) { accordion.processDocument(file); } });