[SmartEditor 2] 엔터시 <P>태그 대신 <BR>태그 적용하기 (2017-11-08 수정) > 질문과 답변 | 그누보드5

[SmartEditor 2] 엔터시 <P>태그 대신 <BR>태그 적용하기 (2017-11-08 수정)

  • profile_image
    고운연주
    • 1건
    • 201회
    • 17-07-24 16:17

네이버 스마트에디터는 줄 바꿈 시 단락태그 "P"를 사용합니다.
Enter 에서

 

대신
이 생성되는 방법입니다.



1. js/SE2BasicCreator.js 58줄
oEditor.registerPlugin(new nhn.husky.SE_WYSIWYGEnterKey("P")); // 엔터 시 처리, 현재는 P로 처리
를 아래와 같이 변경
oEditor.registerPlugin(new nhn.husky.SE_WYSIWYGEnterKey("BR")); // 엔터 시 처리, 현재는 P로 처리


2. js/smarteditor2.js 6301줄
if(sLineBreaker == "BR"){
this.sLineBreaker = "BR";
}else{
this.sLineBreaker = "P";
}
를 아래와 같이 변경
if(sLineBreaker == "BR"){
this.sLineBreaker = "BR";
}else{
this.sLineBreaker = "BR";
}


3. js/smarteditor2.min.js
{this.sLineBreaker="BR"}else{this.sLineBreaker="P"}
를 아래와 같이 변경
{this.sLineBreaker="BR"}else{this.sLineBreaker="BR"}


위의 절차를 거치게 되면 줄바꿈 처리가 "P"태그가 아닌 "BR"로 처리 되는 것을 확인할 수 있다.
단, 단락 태그는 "P"를 사용한다.


참고자료
http://cizel.kr/bbs/board.php?bo_table=10_16&wr_id=357

댓글1

  • profile_image
    최고관리자

답변입니다...

댓글
자동등록방지 숫자를 순서대로 입력하세요.
이름
비번
로고

You can relay on our amazing features list and also our customer services will be great experience.

our amazing features list and also our customer services is great.

코리아 세무회계사무소

서울 송파구 올림픽로35 다길
2층, 3층, 4층

02-1234-5678
© All Rights Reserved by 코리아 세무회계사무소