1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>CHEditor Demo</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <script type="text/javascript" src="../cheditor.js"></script>
- </head>
- <body>
- <h2 style="text-align: center">CHEditor Demo</h2>
- <script type="text/javascript">
- function doSubmit (theform)
- {
-
-
-
-
-
-
-
-
-
-
-
- alert(myeditor.outputBodyHTML());
- return false;
- }
- function showImageInfo() {
- var data = myeditor.getImages();
- if (data == null) {
- alert('올린 이미지가 없습니다.');
- return;
- }
- for (var i=0; i<data.length; i++) {
- var str = '사진 URL: ' + data[i].fileUrl + "\n";
- str += '저장 경로: ' + data[i].filePath + "\n";
- str += '원본 이름: ' + data[i].origName + "\n";
- str += '저장 이름: ' + data[i].fileName + "\n";
- str += '사진 크기: ' + data[i].width + ' X ' + data[i].height + "\n";
- str += '파일 크기: ' + data[i].fileSize;
- alert(str);
- }
- }
- </script>
- <div style="width:80%; margin: 0 auto">
- <form method="post" name="theform" onsubmit="return doSubmit(this)">
- <textarea id="fm_post" name="fm_write">수정할 글 내용입니다.</textarea>
- <script type="text/javascript">
- var myeditor = new cheditor();
- myeditor.config.editorHeight = '300px';
- myeditor.config.editorWidth = '100%';
- myeditor.inputForm = 'fm_post';
- myeditor.run();
- </script>
- <div style="text-align: center; margin-top: 20px">
- <input type="submit" value="글 가져오기" />
- <input type="button" value="이미지 정보" onclick="showImageInfo()" />
- </div>
- </form>
- </div>
- <p style="text-align: center">
- <span style="font-family: verdana; font-size: 12px; color: #666">
- Copyright ⓒ 1997-2019 by <b>CHCODE.</b> All right reserved.
- </span>
- </p>
- </body>
- </html>
|