מהדר שפת א

קוד בשפת א

קוד HTML שנוצר



    
\n"; html += "\n"; html += ""; return html; } function createHTML(value) { return ( "
" + escapeHTML(value.trim()) + "
\n" ); } function escapeHTML(text) { return String(text) .replace(/&/g, "&") .replace(//g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } function copyHTML() { if (!generatedHTML) { return; } if ( navigator.clipboard && window.isSecureContext ) { navigator.clipboard .writeText(generatedHTML) .then(function () { showCopyMessage(); }) .catch(function () { fallbackCopy(); }); } else { fallbackCopy(); } } function fallbackCopy() { var textarea = document.createElement("textarea"); textarea.value = generatedHTML; textarea.style.position = "fixed"; textarea.style.left = "-9999px"; textarea.style.top = "0"; document.body.appendChild(textarea); textarea.focus(); textarea.select(); try { document.execCommand("copy"); showCopyMessage(); } catch (error) { document.getElementById("message").textContent = "לא ניתן להעתיק את ה־HTML."; } document.body.removeChild(textarea); } function showCopyMessage() { var message = document.getElementById("message"); message.textContent = "✓ ה־HTML הועתק בהצלחה"; setTimeout(function () { message.textContent = ""; }, 2500); }