K Editor :: SetDirty

void SetDirty(editor_id)

에디터를 로드 후 변경 하지 않은 상태로 설정 할 때 사용 합니다.
기본 값은 false 입니다.

return value

없음.

parameters

editor_id  적용할 에디터의 id를 의미합니다.

remarks

setDirty를 적용 하면 현재 작성 중인 문서가 초기문서로 설정이 되어 이후 문서의 변경 유무를 IsDirty 함수를 통해 변경 사항을 확인 할 수 있습니다.

sample code

<!-- ..... 생략 ..... -->

<script type="text/javascript" src="keditor/js/raonkeditor.js"></script>	
<script type="text/javascript">

    function RAONKEDITOR_CreationComplete() {
        RAONKEDITOR.SetHtmlContents('<p>K Editor !>/p>', 'editor1'); 

        // id가 editor1인 에디터 디자인 영역의 내용을 setDirty으로 설정합니다.
        RAONKEDITOR.SetDirty('editor1'); 
    }

</script>

<!-- ..... 생략 ..... -->
 
<div style="width:900px;height:550px">  

    <script type="text/javascript">
         new RAONKEditor({Id:'editor1'});
    </script>      
 
</div>

<!-- ..... 생략 ..... -->

</body>
</html>