Generation of absolute path allocation method with domain name after kindeditor picture upload

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.