The key is to specify the following parameters when initializing Kindeditor:
Urltype
"" Null to not modify URL
"Relative" relative path
"Absolute" absolute path
Absolute path with domain name in domain.
Example:
| The code is as follows |
Copy Code |
HtmlEditor = K.create ( ' #content ', { Uploadjson: '.. /kindeditor/jsp/upload_json.jsp ', Filemanagerjson: '.. /kindeditor/jsp/file_manager_json.jsp ', HEIGHT:300, Width: ' 90% ', fontsizetable:[' 21px ', ' 20px ', ' 17px ', ' 18px ', ' 16px ', ' 14px ', ' 12px ', Resizetype:0,//1 Allowpreviewemoticons:true, Allowimageupload:true, Urltype: ' Domain ' }); |
See another method later on another Web site
| code is as follows |
copy code |
| <script> Kindeditor.ready (function (K) { var editor1 = k.create (' Textarea[name= "Content"] ', { Csspath: '/assets/kindeditor/plugins/code/prettify.css ', Uploadjson: '/assets/ Kindeditor/php/upload_json.php ', Filemanagerjson: '/assets/kindeditor/php/file_manager_json.php ', UrlType : ' Domain ', allowfilemanager:true, Aftercreate:function () { var self = this; K.ctrl (document, function () { Self.sync (); K (' form[name=andnews] ') [0].submit (); }); K.ctrl (Self.edit.doc, function () { Self.sync (); K (' form[name=andnews] ') [0].submit (); }); } }); Prettyprint (); }); </script> |