开发者

Looking for a tutorial on how to create a simple text editor? [closed]

开发者 https://www.devze.com 2023-02-24 23:35 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It 开发者_StackOverflowis not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It 开发者_StackOverflowis not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 8 years ago.

Improve this question

I'm looking for a tutorial(s) on how to create a simple text editor. I'm using PHP, MySQL and Jquery on my site?


a simple text editor

<?
if ($_POST) {
  file_put_contents("file.txt",$_POST['text']);
  header ("Location: ".$_SERVER['PHP_SELF']);
  exit;
}
$text = htmlspecialchars(file_get_contents("file.txt"));
?>
<form method="POST">
<textarea name="text"><?=$text?></textarea>
<input type="submit">
</form>


why not just use http://ckeditor.com or any of the many other existing editors. Reinventing the wheel is dumb


I wouldn't call it tutorial, but I think Mozilla's Midasdemo is a good entry.

Specification: http://www.mozilla.org/editor/midas-spec.html
Demo: http://www.mozilla.org/editor/midasdemo/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号