본문 바로가기

Etc

[스마트에디터] onbeforeunload 설정하기 ( 에디터 페이지를 벗어날 때의 처리 )

- SmartEditor2.html 파일에서 에디터 생성시에 설정이 가능합니다. 
nhn.husky.EZCreator.createInIFrame({ 
         ... 
        htParams : { 
                  fOnBeforeUnload : function(){ 
                     //alert("onbeforeunload call");
                }, 
                ... 
        }, 
         ... 
}); 


- htParams > fOnBeforeUnload 함수를 사용하시면 됩니다. 
fOnBeforeUnload이 있는 경우, fOnBeforeUnload()로직을 타게 됩니다. 
(Tip. fOnBeforeUnload() empty함수로 두는 경우 어떠한 액션도 없습니다.) 
fOnBeforeUnload가 없는 경우, 에디터 기본 alert이 발생합니다. 

'Etc' 카테고리의 다른 글

Linux 퍼미션 설정  (0) 2014.06.23
[스마트에디터] textarea에 값이 출력이 안될 때  (0) 2014.06.19
페이스북 hash태그 검색  (0) 2014.06.13