$(document).ready(function () { // 프리뷰 버튼 클릭 이벤트 $('#preview-btn').click(function () { const editorContent = $('#editor').html(); // #editor의 인라인 스타일 가져오기 const editorInlineStyle = document.getElementById('editor').getAttribute('style') || ''; // #editor의 현재 너비 가져오기 let editorWidth = $('#editor-container').width() || document.getElementById('editor-container').getBoundingClientRect().width; // 최소 너비 제한 const minWidth = 400; const popupWidth = Math.max(editorWidth, minWidth); // 현재 적용된 폰트 CSS 파일 가져오기 let fontHref = $('#font-stylesheet').attr('href') || ''; // 팝업창 열기 const popupWindow = window.open('', 'previewWindow', `width=${popupWidth},height=600,resizable=yes`); // 팝업에 HTML 작성 (jQuery 포함 및 adjustOutputResizable 스크립트 추가) popupWindow.document.write(`