form과 textarea를 이용하는 ckeditor 사용예제이다.
[링크 : http://stackoverflow.com/questions/6545521/ckeditor-how-do-i-save-to-the-web-page-i-am-editing]
$ cat test.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>
<form action="save.php" method="post">
<textarea name="text1" class="ckeditor">
<?php
include "./test.html"
?>
</textarea>
<input type="submit" value="Submit"/>
</form>
</body>
</html> |
$ cat save.php
<html>
<head>
<meta http-equiv="refresh" content="0;url=./test.php">
</head>
<?php
$fp = fopen('./test.html','w');
echo $fp;
$ret = fwrite($fp, $_POST['text1']);
echo $ret;
fclose($fp);
?>
</html> |
'프로그램 사용 > ckeditor(웹에디터)' 카테고리의 다른 글
ckeditor full과 standard 그리고 옵션 설정 (0) | 2019.04.03 |
---|---|
ckeditor 모드별 모양 (0) | 2019.03.08 |
ckeditor file upload with node.js (0) | 2019.03.07 |
ckeditor / fckeditor? (0) | 2014.07.16 |
fckeditor plugin for squirrelMail (0) | 2011.06.14 |