מחולל דפי HTML

סמן קטע בטקסט כדי להחיל עליו את גופן רש"י
תצוגה מקדימה
קוד HTML מלא
`; htmlOutput.value = fullHTML; } /* * כפתור: * החל גופן רש"י על הבחירה. */ document .getElementById("rashiButton") .addEventListener("click", function () { const start = inputText.selectionStart; const end = inputText.selectionEnd; if (start === end) { alert( "יש לסמן קודם קטע טקסט." ); return; } rashiRanges.push({ start: start, end: end }); selectionInfo.textContent = "הקטע שסומן יוצג בגופן רש"י"; createPage(); }); /* * כפתור יצירת הדף. */ document .getElementById("createButton") .addEventListener("click", function () { createPage(); }); /* * כפתור העתקת הקוד. */ document .getElementById("copyButton") .addEventListener("click", async function () { createPage(); try { await navigator.clipboard.writeText( htmlOutput.value ); this.textContent = "הקוד הועתק ✓"; setTimeout(() => { this.textContent = "העתק קוד HTML"; }, 2000); } catch (error) { htmlOutput.select(); document.execCommand("copy"); this.textContent = "הקוד הועתק ✓"; setTimeout(() => { this.textContent = "העתק קוד HTML"; }, 2000); } });