If no value is obtained on the processing page, add editor. sync () to the onsubmit of the form; // synchronize the HTML data of the editor to textarea.
KindEditor editor
After the download, place the extracted directory under/Public/editor /.
Introduce css and js files
123456789101112131415161718 |
Script Create editor in script Var editor; KindEditor. ready (function (K) {// defines the toolbar var _ items = ['source', '|', 'Undo ', 'redo', '|', 'justifyleft ', 'justifycenter', 'justifyright', '|', 'fontname', 'fontsize', 'forecolor', 'hilitecolor', 'bold ', 'italic', 'underline ', 'link', 'unlink']; var _ config = {width: '500px ', heigth: '300px', resizeType: 1, items: _ items}; editor = K. create ('# content', _ config) ;}); script note: If no value is obtained on the processing page, add the editor to the onsubmit of the form. sync (); // synchronize the HTML data of the editor to textarea |