Looking for a tutorial on how to create a simple text editor? [closed]
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 questionI'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/
精彩评论