안녕하세요. xe 임베드 파싱 모듈을 스케치북 게시판 댓글 textarea 에서도 사용하고 싶습니다.
이를 위해선 댓글을 <p>태그로 감싸야 할 것 같아 서치도중 알게된 방법으로 여러번 시도했으나 적용하기 어려워 질문드립니다.
https://xetown.com/questions/770323
function
setTextareaReplace() {
var
str = document.getElementById(
"temp_{$oDocument->document_srl}"
).value;
str =
"<p>"
+ str.replace(/(?:\r\n|\r|\n)/g,
"</p>\r\n<p>"
) +
"</p>"
;
str = str.replaceAll(
"<p></p>"
,
"<p> </p>"
);
document.getElementById(
"editor_{$oDocument->document_srl}"
).value = str;
};
스케치북에 적용하려면 어떤 부분을 수정해야할지 알려주실 수 있을까요? 감사합니다.
$oDocument->document_srl 이 부분을 댓글에 맞는 변수로 바꾸는 게 관건이겠네요.