void SetHtmlContents(value, editor_id)
에디터에 html 소스를 넣어줍니다.
return value
없음.
parameters
value 에디터에 넣을 html 소스 입니다.
editor_id 접근할 에디터의 id를 의미합니다.
remarks
예) id가 editor1인 에디터를 생성했을 경우
RAONKEDITOR.SetHtmlContents(html_source, "editor1"), RAONKEDITOR. SetHtmlContents(html_source) 모두 editor1 에디터 디자인 영역에 html 소스를 입력합니다.
sample code
<!-- ..... 생략 ..... --> <script type="text/javascript" src="keditor/js/raonkeditor.js"></script> <script type="text/javascript"> function RAONKEDITOR_CreationComplete() { var html = ''; html += '<html lang="ko" xml:lang="ko">'; html += '<head>'; html += '<title>K Editor</title>'; html += '<meta content="text/html" charset="utf-8" http-equiv="Content-Type">'; html += '<style type="text/css">'; html += 'p { line-height:1.2; margin-top:0px; margin-bottom:0px; }'; html += '</style>'; html += '</head>'; html += '<body>'; html += '<p>Hi, Editor!!</p>'; html += '</body>'; html += '</html>'; // editor1인 에디터 디자인 영역에 html 소스를 입력합니다. RAONKEDITOR.SetHtmlContents(html, 'editor1'); } </script> <!-- ..... 생략 ..... --> <div style="width:900px;height:550px"> <!-- 에디터 생성 --> <script type="text/javascript"> new RAONKEditor({Id:'editor1'}); </script> </div> <!-- ..... 생략 ..... --> </body> </html>