Ckeditor 5 php example
Ckeditor php mysql!
Ckeditor post data php
CKEditor is a WYSIWYG HTML editor.
It makes HTML textarea lot more user-friendly by providing various features like – adding images, writing HTML code, formatting text, etc.
This can also be added to HTML containers.
It does not depend on other libraries like – jQuery and can be used in 3 different modes – Article Editor, Document Editor, and Inline Editor.
Different options are available to customize the editor.
In this tutorial, I am adding Article and Inline mode CKEditor on the same page and save it to MySQL database on submit with PHP.
DemoDownload
Contents
- Table structure
- Configuration
- Download & Include
- HTML
- Demo
- Conclusion
1.
Table structure
Create table.
CREATE TABLE `contents` ( `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, `title` varchar(255) NOT NULL, `short_desc` text NOT NULL, `long_desc` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;2.
Configuration
Create a for database connection.
Completed Code
<?php $host = "localhost"; /* Host name */ $user = "root"; /* User */ $password = ""; /* Password */